From: Alyssa Rosenzweig Date: Thu, 21 May 2020 16:13:38 +0000 (-0400) Subject: pan/mdg: Explain ld/st sign/zero extension X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=31e13956e128b9409a7c34f1b5c54081079c13cb;p=mesa.git pan/mdg: Explain ld/st sign/zero extension Now we know why there are duplicates :-) Signed-off-by: Alyssa Rosenzweig Part-of: --- 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},