pan/mdg: Add pack_colour_32 opcode
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 14 May 2020 17:29:22 +0000 (13:29 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 22 May 2020 18:05:14 +0000 (18:05 +0000)
Seen for RGB10_A2UI packing.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5153>

src/panfrost/midgard/midgard.h
src/panfrost/midgard/midgard_ops.c

index 13e7bac210a3064b174d209a96126b7d9fdc1965..705bbd386cb9da29144b395b4781fcf8a2c14ba6 100644 (file)
@@ -415,6 +415,9 @@ typedef enum {
         /* Packs a colour from fp16 to a native format */
         midgard_op_pack_colour   = 0x09,
 
+        /* Likewise packs from fp32 */
+        midgard_op_pack_colour_32 = 0x0A,
+
         /* 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). */
index 8bb2528711a019b90a60b2c470ddfb5be644db26..5e3debec9a7d243aed6717d904b339a211547e27 100644 (file)
@@ -182,6 +182,7 @@ struct mir_op_props alu_opcode_props[256] = {
 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_pack_colour_32] = {"pack_colour_32", 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},