summaryrefslogtreecommitdiff
path: root/src/resources/dye/dyepalette.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-20 23:51:08 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-20 23:51:08 +0300
commit1dcb529da1483ef67426236480abe79e5e952ef0 (patch)
tree72b1454f812025381a12cd9ec15dd7346d87551e /src/resources/dye/dyepalette.h
parent83c4dc85adf03d22b8e7c0ac56abfdaced84edf8 (diff)
downloadmanaplus-1dcb529da1483ef67426236480abe79e5e952ef0.tar.gz
manaplus-1dcb529da1483ef67426236480abe79e5e952ef0.tar.bz2
manaplus-1dcb529da1483ef67426236480abe79e5e952ef0.tar.xz
manaplus-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.h22
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,