diff options
author | 2017-09-29 10:32:33 -0600 | |
---|---|---|
committer | 2017-09-29 11:05:14 -0600 | |
commit | 93c7761d9d4a0da8a9491cc06b310cc6d4019f5f (patch) | |
tree | 2ffc170a9f0075465929e3779cbfa91ffa04292e /src/emu/video | |
parent | c31dfdcfda8b724c8f211f11fe60f6ea530f7cda (diff) |
rgbsse: Rather simple performance optimization. (nw)
Diffstat (limited to 'src/emu/video')
-rw-r--r-- | src/emu/video/rgbsse.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/video/rgbsse.h b/src/emu/video/rgbsse.h index ce7c848ae4d..68e57bca7fd 100644 --- a/src/emu/video/rgbsse.h +++ b/src/emu/video/rgbsse.h @@ -38,9 +38,9 @@ public: rgbaint_t &operator=(const rgbaint_t& other) = default; void set(const rgbaint_t& other) { m_value = other.m_value; } - void set(u32 rgba) { m_value = _mm_and_si128(_mm_set1_epi32(0xff), _mm_set_epi32(rgba >> 24, rgba >> 16, rgba >> 8, rgba)); } + void set(const u32& rgba) { m_value = _mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128(rgba), _mm_setzero_si128()), _mm_setzero_si128()); } void set(s32 a, s32 r, s32 g, s32 b) { m_value = _mm_set_epi32(a, r, g, b); } - void set(const rgb_t& rgb) { m_value = _mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128(rgb), _mm_setzero_si128()), _mm_setzero_si128()); } + void set(const rgb_t& rgb) { set((const u32&) rgb); } inline rgb_t to_rgba() const { |