Reactor: Switch swizzles over to 16-bit hex codes This migrates from 2-bit swizzle codes per lane to 4-bit, which reads more fluently in hex. The order has been reversed so that the most significant nibble (leftmost on little-endian CPUs) represents the first output lane. Fixed up Swizzle, Mask, and ShuffleLowHigh Bug: b/145746360 Change-Id: I132bd757801a5ca543ef2b9b0ed34d0527db5bfa Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39049 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: David Turner <digit@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/src/Renderer/QuadRasterizer.cpp b/src/Renderer/QuadRasterizer.cpp index 947a88b..a16c457 100644 --- a/src/Renderer/QuadRasterizer.cpp +++ b/src/Renderer/QuadRasterizer.cpp
@@ -272,8 +272,8 @@ xLeft[q] = *Pointer<Short4>(primitive + q * sizeof(Primitive) + OFFSET(Primitive,outline) + y * sizeof(Primitive::Span)); xRight[q] = xLeft[q]; - xLeft[q] = Swizzle(xLeft[q], 0xA0) - Short4(1, 2, 1, 2); - xRight[q] = Swizzle(xRight[q], 0xF5) - Short4(0, 1, 0, 1); + xLeft[q] = Swizzle(xLeft[q], 0x0022) - Short4(1, 2, 1, 2); + xRight[q] = Swizzle(xRight[q], 0x1133) - Short4(0, 1, 0, 1); } For(Int x = x0, x < x1, x += 2)