From 1dcb529da1483ef67426236480abe79e5e952ef0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 20 Dec 2016 23:51:08 +0300 Subject: Add simd function for dye replace color (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 5f71180de..0e7567c56 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -65,6 +65,28 @@ class DyePalette final void replaceSColor(uint32_t *restrict pixels, const int bufSize) const restrict2; + /** + * replace colors for SDL for S dye. + */ + void replaceSColorDefault(uint32_t *restrict pixels, + const int bufSize) const restrict2; + + /** + * replace colors for SDL for S dye. + */ + FUNCTION_SIMD_DEFAULT + void replaceSColor256(uint32_t *restrict pixels, + const int bufSize) const restrict2; + +#ifdef SIMD_SUPPORTED + /** + * replace colors for SDL for S dye. + */ + __attribute__ ((target ("avx2"))) + void replaceSColor256(uint32_t *restrict pixels, + const int bufSize) const restrict2; +#endif // SIMD_SUPPORTED + /** * replace colors for SDL for A dye. */ -- cgit v1.2.3-70-g09d2