pan/midgard: Identify ld_color_buffer_u8_as_fp16*
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 7 Nov 2019 02:49:35 +0000 (21:49 -0500)
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>
Mon, 11 Nov 2019 15:23:44 +0000 (15:23 +0000)
There are two versions of this opcode, depending what version of the ISA
you're using. I'm not sure if there's a semantic difference; I think
there might be some slight subtleties but it's too early to know at this
stage.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
src/panfrost/midgard/midgard.h
src/panfrost/midgard/midgard_ops.c

index 2093f953477437311d266cdbd26c2f1761234bb8..ea026621db35c390f2d0f42516fabe412dde56ff 100644 (file)
@@ -448,7 +448,9 @@ typedef enum {
         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,
+
+        /* Old version of midgard_op_ld_color_buffer_u8_as_fp16, for T720 */
+        midgard_op_ld_color_buffer_u8_as_fp16_old = 0x9D,
 
         /* The distinction between these ops is the alignment requirement /
          * accompanying shift. Thus, the offset to ld_ubo_int4 is in 16-byte
@@ -464,6 +466,8 @@ typedef enum {
         midgard_op_ld_ubo_short4 = 0xAC,
         midgard_op_ld_ubo_int4   = 0xB0,
 
+        /* New-style blending ops. Works on T760/T860 */
+        midgard_op_ld_color_buffer_u8_as_fp16 = 0xB9,
         midgard_op_ld_color_buffer_8 = 0xBA,
 
         midgard_op_st_char = 0xC0,
index d4a74dc0fb44aa12647b33e3a478bb1d25616f78..14c74f7433c80772c425936a346c12d8f05e260f 100644 (file)
@@ -223,7 +223,8 @@ struct mir_ldst_op_props load_store_opcode_props[256] = {
         [midgard_op_ld_vary_32u] = {"ld_vary_32u", M32},
 
         [midgard_op_ld_color_buffer_8]  = {"ld_color_buffer_8",  M8 | LDST_SPECIAL_MASK},
-        [midgard_op_ld_color_buffer_16] = {"ld_color_buffer_16", 0},
+        [midgard_op_ld_color_buffer_u8_as_fp16] = {"ld_color_buffer_u8_as_fp16", M16 | LDST_SPECIAL_MASK},
+        [midgard_op_ld_color_buffer_u8_as_fp16_old] = {"ld_color_buffer_u8_as_fp16_old", M16 | LDST_SPECIAL_MASK},
 
         [midgard_op_ld_ubo_char]   = {"ld_ubo_char",   M32},
         [midgard_op_ld_ubo_char2]  = {"ld_ubo_char2",  M16},