Mesa (master): panfrost: Identify un/pack colour opcodes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 18 14:33:39 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Wed Jan  8 15:11:45 2020 -0500

panfrost: Identify un/pack colour opcodes

We still need to identify formats in the disassembler, but this will at
least get the opcode name clear.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3462>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3462>

---

 src/panfrost/midgard/midgard.h         | 6 ++++++
 src/panfrost/midgard/midgard_compile.c | 1 +
 src/panfrost/midgard/midgard_ops.c     | 2 ++
 3 files changed, 9 insertions(+)

diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h
index 560c1295135..909a2d12d2c 100644
--- a/src/panfrost/midgard/midgard.h
+++ b/src/panfrost/midgard/midgard.h
@@ -391,6 +391,12 @@ midgard_writeout;
 typedef enum {
         midgard_op_ld_st_noop   = 0x03,
 
+        /* Unpack a colour from a native format to fp16 */
+        midgard_op_unpack_colour = 0x05,
+
+        /* Packs a colour from fp16 to a native format */
+        midgard_op_pack_colour   = 0x09,
+
         /* Unclear why this is on the L/S unit, but moves fp32 cube map
          * coordinates in r27 to its cube map texture coordinate destination
          * (e.g r29). */
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index f1cf91caeca..d536f66449b 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -210,6 +210,7 @@ M_LOAD(ld_color_buffer_32u);
 M_STORE(st_vary_32);
 M_LOAD(ld_cubemap_coords);
 M_LOAD(ld_compute_id);
+M_LOAD(pack_colour);
 
 static midgard_instruction
 v_branch(bool conditional, bool invert)
diff --git a/src/panfrost/midgard/midgard_ops.c b/src/panfrost/midgard/midgard_ops.c
index 4d33eaa3da4..2f33af06635 100644
--- a/src/panfrost/midgard/midgard_ops.c
+++ b/src/panfrost/midgard/midgard_ops.c
@@ -180,6 +180,8 @@ struct mir_op_props alu_opcode_props[256] = {
 #define M64 midgard_reg_mode_64
 
 struct mir_ldst_op_props load_store_opcode_props[256] = {
+        [midgard_op_unpack_colour] = {"unpack_colour", M32},
+        [midgard_op_pack_colour] = {"pack_colour", M32},
         [midgard_op_ld_cubemap_coords] = {"ld_cubemap_coords", M32},
         [midgard_op_ld_compute_id] = {"ld_compute_id", M32},
         [midgard_op_ldst_perspective_division_z] = {"ldst_perspective_division_z", M32},



More information about the mesa-commit mailing list