nir: fix definition of pack_uvec2_to_uint
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 5 Sep 2016 02:46:13 +0000 (22:46 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 7 Sep 2016 02:45:44 +0000 (22:45 -0400)
Found by inspection. Untested beyond compilation. This also matches the
logic used in nir_lower_alu_to_scalar.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable@lists.freedesktop.org
src/compiler/nir/nir_opcodes.py

index 15066c2b580c760193ac7e78f9ca83a033fd070e..7045c953bef694f4570a03b09e9e25b021164cfc 100644 (file)
@@ -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, """