From f3729240770f5a18b22fe1992e3775161246d60d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Dec 2016 01:41:05 +0300 Subject: Add a color dye function for sse2 (OpenGL). --- src/resources/dye/dyepalette.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/resources/dye/dyepalette.h') diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h index 19a406097..79bc03443 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -197,13 +197,45 @@ class DyePalette final void replaceAOGLColorSimd(uint32_t *restrict pixels, const int bufSize) const restrict2; + /** + * replace colors for OpenGL for A dye. + */ + FUNCTION_SIMD_DEFAULT + void replaceAOGLColorSse2(uint32_t *restrict pixels, + const int bufSize) const restrict2; + + /** + * replace colors for OpenGL for A dye. + */ + FUNCTION_SIMD_DEFAULT + void replaceAOGLColorAvx2(uint32_t *restrict pixels, + const int bufSize) const restrict2; + #ifdef SIMD_SUPPORTED + /** + * replace colors for OpenGL for A dye. + */ + __attribute__ ((target ("sse2"))) + void replaceAOGLColorSimd(uint32_t *restrict pixels, + const int bufSize) const restrict2; /** * replace colors for OpenGL for A dye. */ __attribute__ ((target ("avx2"))) void replaceAOGLColorSimd(uint32_t *restrict pixels, const int bufSize) const restrict2; + /** + * replace colors for OpenGL for A dye. + */ + __attribute__ ((target ("sse2"))) + void replaceAOGLColorSse2(uint32_t *restrict pixels, + const int bufSize) const restrict2; + /** + * replace colors for OpenGL for A dye. + */ + __attribute__ ((target ("avx2"))) + void replaceAOGLColorAvx2(uint32_t *restrict pixels, + const int bufSize) const restrict2; #endif // SIMD_SUPPORTED #endif // USE_OPENGL -- cgit v1.2.3-60-g2f50