OSDN Git Service

Fix vector packing regression.
authorNicolas Capens <capn@google.com>
Mon, 2 Oct 2017 19:26:11 +0000 (15:26 -0400)
committerNicolas Capens <nicolascapens@google.com>
Mon, 2 Oct 2017 21:49:53 +0000 (21:49 +0000)
When SSE4.1 isn't available, we were infinitely calling PackUnsigned()
recursively.

Bug b/37496082

Change-Id: Ie1fa8150d64740776c5b80baf07d997dde9d51be
Reviewed-on: https://swiftshader-review.googlesource.com/12929
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Casey Dahlin <sadmac@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/Reactor/SubzeroReactor.cpp

index d67b182..b488bf9 100644 (file)
@@ -5983,7 +5983,7 @@ namespace sw
                        RValue<Int4> sy = As<Int4>(y);
                        RValue<Int4> by = (sy & ~(sy >> 31)) - Int4(0x8000);
 
-                       return PackUnsigned(bx, by) + UShort8(0x8000u);
+                       return As<UShort8>(PackSigned(bx, by) + Short8(0x8000u));
                }
        }