panfrost/midgard: Add unsigned ld/st ops
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 28 Jun 2019 16:07:30 +0000 (09:07 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 1 Jul 2019 14:42:55 +0000 (07:42 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/midgard.h
src/gallium/drivers/panfrost/midgard/midgard_compile.c
src/gallium/drivers/panfrost/midgard/midgard_ops.c

index 0a121c3a5b40ca1e4abdf9a648cef12f510984b1..d632063e8a44170d58f1584a99f3e744819b958f 100644 (file)
@@ -419,13 +419,16 @@ typedef enum {
 
         midgard_op_ld_attr_32 = 0x94,
         midgard_op_ld_attr_16 = 0x95,
+        midgard_op_ld_attr_32u = 0x96,
         midgard_op_ld_attr_32i = 0x97,
         midgard_op_ld_vary_32 = 0x98,
         midgard_op_ld_vary_16 = 0x99,
+        midgard_op_ld_vary_32u = 0x9A,
         midgard_op_ld_vary_32i = 0x9B,
         midgard_op_ld_color_buffer_16 = 0x9D,
 
         midgard_op_ld_uniform_16 = 0xAC,
+        midgard_op_ld_uniform_32i = 0xA8,
 
         midgard_op_ld_uniform_32 = 0xB0,
         midgard_op_ld_color_buffer_8 = 0xBA,
@@ -438,6 +441,7 @@ typedef enum {
 
         midgard_op_st_vary_32 = 0xD4,
         midgard_op_st_vary_16 = 0xD5,
+        midgard_op_st_vary_32u = 0xD6,
         midgard_op_st_vary_32i = 0xD7,
 
         /* Value to st in r27, location r26.w as short2 */
index edf7eb0b16aecebc7f32cdd55199e36e7c338e8f..d7155289a7153a9a3934b4125dfa4aa18b6a5929 100644 (file)
@@ -1294,9 +1294,11 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
 
                         /* Use the type appropriate load */
                         switch (t) {
-                                case nir_type_int:
                                 case nir_type_uint:
                                 case nir_type_bool:
+                                        ins.load_store.op = midgard_op_ld_attr_32u;
+                                        break;
+                                case nir_type_int:
                                         ins.load_store.op = midgard_op_ld_attr_32i;
                                         break;
                                 case nir_type_float:
index 3c8535ae09a8f568de5db1a4edc93fa6bf03e776..089d5cecb1f90c2a2878712db5c98a3327d1a2f4 100644 (file)
@@ -190,15 +190,18 @@ const char *load_store_opcode_names[256] = {
         [midgard_op_ld_attr_32] = "ld_attr_32",
         [midgard_op_ld_attr_16] = "ld_attr_16",
         [midgard_op_ld_attr_32i] = "ld_attr_32i",
+        [midgard_op_ld_attr_32u] = "ld_attr_32u",
 
         [midgard_op_ld_vary_32] = "ld_vary_32",
         [midgard_op_ld_vary_16] = "ld_vary_16",
         [midgard_op_ld_vary_32i] = "ld_vary_32i",
+        [midgard_op_ld_vary_32u] = "ld_vary_32u",
 
         [midgard_op_ld_color_buffer_16] = "ld_color_buffer_16",
 
         [midgard_op_ld_uniform_16] = "ld_uniform_16",
         [midgard_op_ld_uniform_32] = "ld_uniform_32",
+        [midgard_op_ld_uniform_32i] = "ld_uniform_32i",
         [midgard_op_ld_color_buffer_8] = "ld_color_buffer_8",
 
         [midgard_op_st_char] = "st_char",
@@ -210,6 +213,7 @@ const char *load_store_opcode_names[256] = {
         [midgard_op_st_vary_32] = "st_vary_32",
         [midgard_op_st_vary_16] = "st_vary_16",
         [midgard_op_st_vary_32i] = "st_vary_32i",
+        [midgard_op_st_vary_32u] = "st_vary_32u",
 
         [midgard_op_st_image_f] = "st_image_f",
         [midgard_op_st_image_ui] = "st_image_ui",