diff --git a/autotest/SIMD/Etalon.log b/autotest/SIMD/Etalon.log index ac3fd1e4a..ad0bc7d00 100644 --- a/autotest/SIMD/Etalon.log +++ b/autotest/SIMD/Etalon.log @@ -1,4 +1,4 @@ -* C:\upp\out\autotest\MSBT19.Debug.Debug_Full\SIMD.exe 28.07.2020 10:09:37, user: cxl +* C:\upp\out\autotest\MSBT19.Debug.Debug_Full\SIMD.exe 28.07.2020 10:15:45, user: cxl LoadRGBAF(&x) = 255 11 22 33 i16x8(*(dword *)s) = 0 0 0 0 0 0 0 5665 @@ -6,6 +6,10 @@ Unpack8L(i16x8(*(dword *)s)) = 0 0 0 0 0 0 22 33 Unpack8L(i16x8(*(dword *)s)) = 0 0 0 0 0 0 22 33 p = [RGBA(255, 255, 0, 255), RGBA(15, 0, 29, 30), RGBA(0, 0, 50, 100), RGBA(0, 100, 0, 200), RGBA(128, 0, 0, 255)] p = [RGBA(254, 10, 0, 255), RGBA(244, 0, 1, 245), RGBA(244, 0, 2, 248), RGBA(244, 4, 0, 253), RGBA(249, 0, 0, 255)] +c = RGBA(250, 0, 0, 250) +LoadRGBA2(c) = 250 250 0 0 250 250 0 0 +Mul8(LoadRGBA2(c), 250) = 244 244 0 0 244 244 0 0 +MakeAlpha(Mul8(LoadRGBA2(c), 250)) = 12 11 11 11 12 11 11 11 ---------------- x = 1 2 3 4 Broadcast0(x) = 4 4 4 4 diff --git a/autotest/SIMD/SIMD.cpp b/autotest/SIMD/SIMD.cpp index 28564a268..ee7fbe583 100644 --- a/autotest/SIMD/SIMD.cpp +++ b/autotest/SIMD/SIMD.cpp @@ -10,26 +10,32 @@ CONSOLE_APP_MAIN StdLogSetup(LOG_COUT|LOG_FILE); #ifdef CPU_SIMD - RGBA x = Color(11, 22, 33); - RGBA *s = &x; + { + RGBA x = Color(11, 22, 33); + RGBA *s = &x; + + DUMP(LoadRGBAF(&x)); + DUMP(i16x8(*(dword *)s)); + DUMP(Unpack8L(i16x8(*(dword *)s))); + DUMP(Unpack8L(i16x8(*(dword *)s))); + + Vector p; + p.Add(Yellow()); + p.Add(30 * Magenta()); + p.Add(100 * Blue()); + p.Add(200 * Green()); + p.Add(Red()); - DUMP(LoadRGBAF(&x)); - DUMP(i16x8(*(dword *)s)); - DUMP(Unpack8L(i16x8(*(dword *)s))); - DUMP(Unpack8L(i16x8(*(dword *)s))); - - Vector p; - p.Add(Yellow()); - p.Add(30 * Magenta()); - p.Add(100 * Blue()); - p.Add(200 * Green()); - p.Add(Red()); - - - DUMP(p); - AlphaBlend(p.begin(), 250 * LtRed(), 250, 5); - DUMP(p); + DUMP(p); + AlphaBlend(p.begin(), 250 * LtRed(), 250, 5); + DUMP(p); + RGBA c = 250 * LtRed(); + DUMP(c); + DUMP(LoadRGBA2(c)); + DUMP(Mul8(LoadRGBA2(c), 250)); + DUMP(MakeAlpha(Mul8(LoadRGBA2(c), 250))); + } { f32x4 x(1, 2, 3, 4);