diff options
author | 2015-06-22 05:29:22 +1000 | |
---|---|---|
committer | 2015-06-23 21:02:31 +0200 | |
commit | 32300be45d9bee18e0e474cef372765b7f2a6f60 (patch) | |
tree | 1fe307e64b02ccd703124fcde0fc7df9e2c47aab /src/emu/video/rgbvmx.h | |
parent | 84aa21184bf11fd709ac7ea678ed4db14f94dd3d (diff) |
Bit more implementation (nw)
Diffstat (limited to 'src/emu/video/rgbvmx.h')
-rw-r--r-- | src/emu/video/rgbvmx.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/video/rgbvmx.h b/src/emu/video/rgbvmx.h index ea92ee7af5f..9c2b6ce35a1 100644 --- a/src/emu/video/rgbvmx.h +++ b/src/emu/video/rgbvmx.h @@ -232,8 +232,8 @@ public: inline void shl_imm_all(const UINT8 shift) { - const vector unsigned char limit = { 128, 128, 128, 128, 128, 128, 128, 128 }; - const vector unsigned char temp = { shift, shift, shift, shift, shift, shift, shift, shift }; + const vector unsigned char limit = { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }; + const vector unsigned char temp = { shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift }; m_value = vec_and(vec_slo(m_value, temp), (vector unsigned int)vec_cmpgt(limit, temp)); } @@ -252,8 +252,8 @@ public: inline void shr_imm_all(const UINT8 shift) { - const vector unsigned char limit = { 128, 128, 128, 128, 128, 128, 128, 128 }; - const vector unsigned char temp = { shift, shift, shift, shift, shift, shift, shift, shift }; + const vector unsigned char limit = { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }; + const vector unsigned char temp = { shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift }; m_value = vec_and(vec_sro(m_value, temp), (vector unsigned int)vec_cmpgt(limit, temp)); } @@ -452,10 +452,9 @@ public: return *this; } - inline void merge_alpha(rgbaint_t& alpha) + inline void merge_alpha(const rgbaint_t& alpha) { - m_value = _mm_insert_epi16(m_value, _mm_extract_epi16(alpha.m_value, 7), 7); - m_value = _mm_insert_epi16(m_value, _mm_extract_epi16(alpha.m_value, 6), 6); + m_value = vec_perm(m_value, alpha.m_value, merge_alpha_perm); } static UINT32 bilinear_filter(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v); @@ -472,6 +471,7 @@ protected: static const VECU32 red_mask; static const VECU32 green_mask; static const VECU32 blue_mask; + static const VECU8 merge_aplha_perm; static const VECU16 scale_table[256]; }; |