summaryrefslogtreecommitdiff
path: root/src/resources/dye/dyepalette.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-23 02:12:37 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-23 02:12:37 +0300
commit2a9a7f7f0aa63f351100e7040e5827c7e1ed4015 (patch)
tree30feef3dd6b62b42f07213db7d3e15cc3d7e0b61 /src/resources/dye/dyepalette.h
parentf3729240770f5a18b22fe1992e3775161246d60d (diff)
downloadmanaplus-2a9a7f7f0aa63f351100e7040e5827c7e1ed4015.tar.gz
manaplus-2a9a7f7f0aa63f351100e7040e5827c7e1ed4015.tar.bz2
manaplus-2a9a7f7f0aa63f351100e7040e5827c7e1ed4015.tar.xz
manaplus-2a9a7f7f0aa63f351100e7040e5827c7e1ed4015.zip
Add s color dye function for sse2 (software).
Diffstat (limited to 'src/resources/dye/dyepalette.h')
-rw-r--r--src/resources/dye/dyepalette.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h
index 79bc03443..ede36eb6d 100644
--- a/src/resources/dye/dyepalette.h
+++ b/src/resources/dye/dyepalette.h
@@ -78,13 +78,48 @@ class DyePalette final
void replaceSColorSimd(uint32_t *restrict pixels,
const int bufSize) const restrict2;
+ /**
+ * replace colors for SDL for S dye.
+ */
+ FUNCTION_SIMD_DEFAULT
+ void replaceSColorSse2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+ /**
+ * replace colors for SDL for S dye.
+ */
+ FUNCTION_SIMD_DEFAULT
+ void replaceSColorAvx2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
#ifdef SIMD_SUPPORTED
/**
* replace colors for SDL for S dye.
*/
+ __attribute__ ((target ("sse2")))
+ void replaceSColorSimd(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+ /**
+ * replace colors for SDL for S dye.
+ */
__attribute__ ((target ("avx2")))
void replaceSColorSimd(uint32_t *restrict pixels,
const int bufSize) const restrict2;
+
+ /**
+ * replace colors for SDL for S dye.
+ */
+ __attribute__ ((target ("sse2")))
+ void replaceSColorSse2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
+
+ /**
+ * replace colors for SDL for S dye.
+ */
+ __attribute__ ((target ("avx2")))
+ void replaceSColorAvx2(uint32_t *restrict pixels,
+ const int bufSize) const restrict2;
#endif // SIMD_SUPPORTED
/**