rgbsse: Declare scale_imm_and_clamp as inline to ensure that it compiles as fully inlined in voodoo rasterizers. (nw)

This commit is contained in:
Ted Green 2017-09-23 08:16:21 -06:00
parent 3573479484
commit 9b5220274a
2 changed files with 7 additions and 8 deletions

View File

@ -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)

View File

@ -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)
{