[Mesa-dev] [PATCH 4/7] panfrost/midgard: Add unsigned ld/st ops

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Mon Jul 1 14:55:53 UTC 2019


Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
 src/gallium/drivers/panfrost/midgard/midgard.h         | 4 ++++
 src/gallium/drivers/panfrost/midgard/midgard_compile.c | 4 +++-
 src/gallium/drivers/panfrost/midgard/midgard_ops.c     | 4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/midgard/midgard.h b/src/gallium/drivers/panfrost/midgard/midgard.h
index 0a121c3a5b4..d632063e8a4 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard.h
+++ b/src/gallium/drivers/panfrost/midgard/midgard.h
@@ -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 */
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index edf7eb0b16a..d7155289a71 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -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:
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_ops.c b/src/gallium/drivers/panfrost/midgard/midgard_ops.c
index 3c8535ae09a..089d5cecb1f 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_ops.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_ops.c
@@ -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",
-- 
2.20.1



More information about the mesa-dev mailing list