From bf9006d08721d0faa3bbca73d37224c67a317f48 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Dec 2016 20:25:56 +0300 Subject: Add simd function for dye replaceacolor (OpenGL). --- src/resources/dye/dyepalette.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/resources/dye/dyepalette.h') diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h index edfe6b5ac..07085e7b6 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -149,6 +149,28 @@ class DyePalette final void replaceAOGLColor(uint32_t *restrict pixels, const int bufSize) const restrict2; + /** + * replace colors for OpenGL for A dye. + */ + void replaceAOGLColorDefault(uint32_t *restrict pixels, + const int bufSize) const restrict2; + + /** + * replace colors for OpenGL for A dye. + */ + FUNCTION_SIMD_DEFAULT + void replaceAOGLColorSimd(uint32_t *restrict pixels, + const int bufSize) const restrict2; + +#ifdef SIMD_SUPPORTED + /** + * replace colors for OpenGL for A dye. + */ + __attribute__ ((target ("avx2"))) + void replaceAOGLColorSimd(uint32_t *restrict pixels, + const int bufSize) const restrict2; +#endif // SIMD_SUPPORTED + static unsigned int hexDecode(const signed char c) noexcept2 A_CONST A_WARN_UNUSED; -- cgit v1.2.3-60-g2f50