From 68f98656ff06ac491e4f233f8a77b4a08fd4f87e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Dec 2016 20:09:30 +0300 Subject: Add simd function for dye replaceacolor (Software). --- 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 4622527fd..edfe6b5ac 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -93,6 +93,28 @@ class DyePalette final void replaceAColor(uint32_t *restrict pixels, const int bufSize) const restrict2; + /** + * replace colors for SDL for A dye. + */ + void replaceAColorDefault(uint32_t *restrict pixels, + const int bufSize) const restrict2; + + /** + * replace colors for SDL for A dye. + */ + FUNCTION_SIMD_DEFAULT + void replaceAColorSimd(uint32_t *restrict pixels, + const int bufSize) const restrict2; + +#ifdef SIMD_SUPPORTED + /** + * replace colors for SDL for A dye. + */ + __attribute__ ((target ("avx2"))) + void replaceAColorSimd(uint32_t *restrict pixels, + const int bufSize) const restrict2; +#endif // SIMD_SUPPORTED + /** * replace colors for OpenGL for S dye. */ -- cgit v1.2.3-60-g2f50