diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-12-20 23:51:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-12-20 23:51:08 +0300 |
commit | 1dcb529da1483ef67426236480abe79e5e952ef0 (patch) | |
tree | 72b1454f812025381a12cd9ec15dd7346d87551e /src/resources/dye/dyepalette.h | |
parent | 83c4dc85adf03d22b8e7c0ac56abfdaced84edf8 (diff) | |
download | mv-1dcb529da1483ef67426236480abe79e5e952ef0.tar.gz mv-1dcb529da1483ef67426236480abe79e5e952ef0.tar.bz2 mv-1dcb529da1483ef67426236480abe79e5e952ef0.tar.xz mv-1dcb529da1483ef67426236480abe79e5e952ef0.zip |
Add simd function for dye replace color (software).
Diffstat (limited to 'src/resources/dye/dyepalette.h')
-rw-r--r-- | src/resources/dye/dyepalette.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ -66,6 +66,28 @@ class DyePalette final 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. */ void replaceAColor(uint32_t *restrict pixels, |