From 9b5220274a1403d3fdf7189d5c40ff233d994fb9 Mon Sep 17 00:00:00 2001 From: Ted Green Date: Sat, 23 Sep 2017 08:16:21 -0600 Subject: [PATCH] rgbsse: Declare scale_imm_and_clamp as inline to ensure that it compiles as fully inlined in voodoo rasterizers. (nw) --- src/emu/video/rgbsse.cpp | 7 ------- src/emu/video/rgbsse.h | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/emu/video/rgbsse.cpp b/src/emu/video/rgbsse.cpp index 35ea6a1948f..24c09fc68c3 100644 --- a/src/emu/video/rgbsse.cpp +++ b/src/emu/video/rgbsse.cpp @@ -184,11 +184,4 @@ void rgbaint_t::scale_and_clamp(const rgbaint_t& scale) clamp_to_uint8(); } -void rgbaint_t::scale_imm_and_clamp(const s32 scale) -{ - mul_imm(scale); - sra_imm(8); - clamp_to_uint8(); -} - #endif // defined(__SSE2__) || defined(_MSC_VER) diff --git a/src/emu/video/rgbsse.h b/src/emu/video/rgbsse.h index 83028f894d2..ce7c848ae4d 100644 --- a/src/emu/video/rgbsse.h +++ b/src/emu/video/rgbsse.h @@ -282,7 +282,13 @@ public: void blend(const rgbaint_t& other, u8 factor); void scale_and_clamp(const rgbaint_t& scale); - void scale_imm_and_clamp(const s32 scale); + + inline void scale_imm_and_clamp(const s32 scale) + { + mul_imm(scale); + sra_imm(8); + clamp_to_uint8(); + } inline void scale_imm_add_and_clamp(const s32 scale, const rgbaint_t& other) {