summaryrefslogtreecommitdiff
path: root/src/resources/dye/dyepalette.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-23 01:31:10 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-23 01:48:42 +0300
commitf3ebfff841aafc0aac6186243606e1b2ea381e71 (patch)
treee32fb5267f9776c460e7e38d0e544fed383d25e7 /src/resources/dye/dyepalette.h
parent1129a3f3047fc5acd917e9a352b0e266677e0640 (diff)
downloadmanaverse-f3ebfff841aafc0aac6186243606e1b2ea381e71.tar.gz
manaverse-f3ebfff841aafc0aac6186243606e1b2ea381e71.tar.bz2
manaverse-f3ebfff841aafc0aac6186243606e1b2ea381e71.tar.xz
manaverse-f3ebfff841aafc0aac6186243606e1b2ea381e71.zip
Add a color dye function for sse2 (software).
Diffstat (limited to 'src/resources/dye/dyepalette.h')
-rw-r--r--src/resources/dye/dyepalette.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h
index 4cbfa3efc..19a406097 100644
--- a/src/resources/dye/dyepalette.h
+++ b/src/resources/dye/dyepalette.h
@@ -106,13 +106,47 @@ class DyePalette final
void replaceAColorSimd(uint32_t *restrict pixels,
const int bufSize) const restrict2;
+ /**
+ * replace colors for SDL for A dye.
+ */
+ FUNCTION_SIMD_DEFAULT
+ void replaceAColorSse2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+ /**
+ * replace colors for SDL for A dye.
+ */
+ FUNCTION_SIMD_DEFAULT
+ void replaceAColorAvx2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
#ifdef SIMD_SUPPORTED
/**
* replace colors for SDL for A dye.
*/
+ __attribute__ ((target ("sse2")))
+ void replaceAColorSimd(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+ /**
+ * replace colors for SDL for A dye.
+ */
__attribute__ ((target ("avx2")))
void replaceAColorSimd(uint32_t *restrict pixels,
const int bufSize) const restrict2;
+ /**
+ * replace colors for SDL for A dye.
+ */
+ __attribute__ ((target ("sse2")))
+ void replaceAColorSse2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+ /**
+ * replace colors for SDL for A dye.
+ */
+ __attribute__ ((target ("avx2")))
+ void replaceAColorAvx2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
#endif // SIMD_SUPPORTED
#ifdef USE_OPENGL