aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-21 12:13:38 -0400
committerMarge Bot <[email protected]>2020-05-21 17:49:14 +0000
commit31e13956e128b9409a7c34f1b5c54081079c13cb (patch)
treeadcb6387d482a261f3ef87d5c43a57a277574925 /src/panfrost/midgard
parentdbcae7c66719c53a0f8b5e4e3ed43d2223650558 (diff)
pan/mdg: Explain ld/st sign/zero extension
Now we know why there are duplicates :-) Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard.h7
-rw-r--r--src/panfrost/midgard/midgard_ops.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h
index aae81671449..273e0735f24 100644
--- a/src/panfrost/midgard/midgard.h
+++ b/src/panfrost/midgard/midgard.h
@@ -458,9 +458,10 @@ typedef enum {
/* Used for compute shader's __global arguments, __local variables (or
* for register spilling) */
- midgard_op_ld_char = 0x81,
- midgard_op_ld_char2 = 0x84,
- midgard_op_ld_short = 0x85,
+ midgard_op_ld_uchar = 0x80, /* zero extends */
+ midgard_op_ld_char = 0x81, /* sign extends */
+ midgard_op_ld_ushort = 0x84, /* zero extends */
+ midgard_op_ld_short = 0x85, /* sign extends */
midgard_op_ld_char4 = 0x88, /* short2, int, float */
midgard_op_ld_short4 = 0x8C, /* int2, float2, long */
midgard_op_ld_int4 = 0x90, /* float4, long2 */
diff --git a/src/panfrost/midgard/midgard_ops.c b/src/panfrost/midgard/midgard_ops.c
index c2006d72df1..8bb2528711a 100644
--- a/src/panfrost/midgard/midgard_ops.c
+++ b/src/panfrost/midgard/midgard_ops.c
@@ -207,8 +207,9 @@ struct mir_ldst_op_props load_store_opcode_props[256] = {
[midgard_op_atomic_umax64] = {"atomic_umax64", M64 | LDST_SIDE_FX},
[midgard_op_atomic_xchg64] = {"atomic_xchg64", M64 | LDST_SIDE_FX},
+ [midgard_op_ld_uchar] = {"ld_uchar", M32 | LDST_ADDRESS},
[midgard_op_ld_char] = {"ld_char", M32 | LDST_ADDRESS},
- [midgard_op_ld_char2] = {"ld_char2", M16 | LDST_ADDRESS},
+ [midgard_op_ld_ushort] = {"ld_ushort", M32 | LDST_ADDRESS},
[midgard_op_ld_short] = {"ld_short", M32 | LDST_ADDRESS},
[midgard_op_ld_char4] = {"ld_char4", M32 | LDST_ADDRESS},
[midgard_op_ld_short4] = {"ld_short4", M32 | LDST_ADDRESS},