summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2018-06-06 20:55:03 +0100
committerMarek Olšák <[email protected]>2018-08-01 00:10:00 -0400
commit00589be6c42501779e609b6c1e89a14d8536df08 (patch)
tree4677916e89ad2a0af60dd461adca6bb9b8f36d43 /src/gallium/auxiliary
parent1fb388cd20f6eb14474d2267c4a6c4840a925e57 (diff)
gallium: add new SAMP2HND and IMG2HND opcodes
This commit does not add support for the opcodes in gallivm or tgsi_to_nir.c Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h4
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index 4aa658785cf..bbe1a21e432 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -153,6 +153,8 @@ tgsi_opcode_infer_type(enum tgsi_opcode opcode)
case TGSI_OPCODE_POPC:
case TGSI_OPCODE_LSB:
case TGSI_OPCODE_UMSB:
+ case TGSI_OPCODE_IMG2HND:
+ case TGSI_OPCODE_SAMP2HND:
return TGSI_TYPE_UNSIGNED;
case TGSI_OPCODE_ARL:
case TGSI_OPCODE_ARR:
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h b/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h
index 1b2803cf3fe..c3787c2fbb2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h
@@ -162,8 +162,8 @@ OPCODE(1, 1, COMP, IABS)
OPCODE(1, 1, COMP, ISSG)
OPCODE(1, 2, OTHR, LOAD)
OPCODE(1, 2, OTHR, STORE, .is_store = 1)
-OPCODE_GAP(163) /* removed */
-OPCODE_GAP(164) /* removed */
+OPCODE(1, 1, OTHR, IMG2HND)
+OPCODE(1, 1, OTHR, SAMP2HND, .is_tex = 1)
OPCODE_GAP(165) /* removed */
OPCODE(0, 0, OTHR, BARRIER)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
index 9a13fa6684a..54a1ee15b68 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -160,6 +160,9 @@ OP13(UCMP)
OP11(IABS)
OP11(ISSG)
+OP11(IMG2HND)
+OP11(SAMP2HND)
+
OP12(IMUL_HI)
OP12(UMUL_HI)