summaryrefslogtreecommitdiff
path: root/src/resources/dye/dyepalette.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-21 20:09:30 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-21 20:09:30 +0300
commit68f98656ff06ac491e4f233f8a77b4a08fd4f87e (patch)
tree52e3a165da2c39b80a110bc02cb10fefe88a77cd /src/resources/dye/dyepalette.h
parent076ce7dd10a687134b949f9509d886609607ec67 (diff)
downloadmanaverse-68f98656ff06ac491e4f233f8a77b4a08fd4f87e.tar.gz
manaverse-68f98656ff06ac491e4f233f8a77b4a08fd4f87e.tar.bz2
manaverse-68f98656ff06ac491e4f233f8a77b4a08fd4f87e.tar.xz
manaverse-68f98656ff06ac491e4f233f8a77b4a08fd4f87e.zip
Add simd function for dye replaceacolor (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 4622527fd..edfe6b5ac 100644
--- a/src/resources/dye/dyepalette.h
+++ b/src/resources/dye/dyepalette.h
@@ -94,6 +94,28 @@ class DyePalette final
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.
*/
void replaceSOGLColor(uint32_t *restrict pixels,