summaryrefslogtreecommitdiff
path: root/src/resources/dye/dyepalette.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-21 20:25:56 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-21 20:31:41 +0300
commitbf9006d08721d0faa3bbca73d37224c67a317f48 (patch)
treefe3a3c8abc03e0bd2f7ca3205a53f79d7fd08e6f /src/resources/dye/dyepalette.h
parent68f98656ff06ac491e4f233f8a77b4a08fd4f87e (diff)
downloadplus-bf9006d08721d0faa3bbca73d37224c67a317f48.tar.gz
plus-bf9006d08721d0faa3bbca73d37224c67a317f48.tar.bz2
plus-bf9006d08721d0faa3bbca73d37224c67a317f48.tar.xz
plus-bf9006d08721d0faa3bbca73d37224c67a317f48.zip
Add simd function for dye replaceacolor (OpenGL).
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 edfe6b5ac..07085e7b6 100644
--- a/src/resources/dye/dyepalette.h
+++ b/src/resources/dye/dyepalette.h
@@ -149,6 +149,28 @@ class DyePalette final
void replaceAOGLColor(uint32_t *restrict pixels,
const int bufSize) const restrict2;
+ /**
+ * replace colors for OpenGL for A dye.
+ */
+ void replaceAOGLColorDefault(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+ /**
+ * replace colors for OpenGL for A dye.
+ */
+ FUNCTION_SIMD_DEFAULT
+ void replaceAOGLColorSimd(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+#ifdef SIMD_SUPPORTED
+ /**
+ * replace colors for OpenGL for A dye.
+ */
+ __attribute__ ((target ("avx2")))
+ void replaceAOGLColorSimd(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+#endif // SIMD_SUPPORTED
+
static unsigned int hexDecode(const signed char c)
noexcept2 A_CONST A_WARN_UNUSED;