Mesa (master): nir: fix definition of pack_uvec2_to_uint

Ilia Mirkin imirkin at kemper.freedesktop.org
Wed Sep 7 04:12:32 UTC 2016


Module: Mesa
Branch: master
Commit: 8c8874eafbe5f7cbb5d413ae1be660c9f001ced5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c8874eafbe5f7cbb5d413ae1be660c9f001ced5

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Sep  4 22:46:13 2016 -0400

nir: fix definition of pack_uvec2_to_uint

Found by inspection. Untested beyond compilation. This also matches the
logic used in nir_lower_alu_to_scalar.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: mesa-stable at lists.freedesktop.org

---

 src/compiler/nir/nir_opcodes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index 15066c2..7045c95 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -257,7 +257,7 @@ unpack_4x8("unorm")
 unpack_2x16("half")
 
 unop_horiz("pack_uvec2_to_uint", 1, tuint32, 2, tuint32, """
-dst.x = (src0.x & 0xffff) | (src0.y >> 16);
+dst.x = (src0.x & 0xffff) | (src0.y << 16);
 """)
 
 unop_horiz("pack_uvec4_to_uint", 1, tuint32, 4, tuint32, """




More information about the mesa-commit mailing list