summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:49:53 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:49:53 +0000
commitd264279e28002d81821c883795911844a4c01a2c (patch)
treeb0481616eda55b543a0dc1487d096c3239885c41 /lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c
parentfdcc03929065b5bf5dd93553db219ea3e05c8c34 (diff)
Merge Mesa 19.2.8
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c')
-rw-r--r--lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c
index d249b956e..477876d7e 100644
--- a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -254,6 +254,19 @@ tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, uint src_idx)
(opcode == TGSI_OPCODE_DLDEXP || opcode == TGSI_OPCODE_LDEXP))
return TGSI_TYPE_SIGNED;
+ if (src_idx == 1 &&
+ (opcode == TGSI_OPCODE_LOAD))
+ return TGSI_TYPE_UNSIGNED;
+
+ if (src_idx == 0 &&
+ (opcode == TGSI_OPCODE_STORE))
+ return TGSI_TYPE_UNSIGNED;
+
+ if (src_idx == 1 &&
+ ((opcode >= TGSI_OPCODE_ATOMUADD && opcode <= TGSI_OPCODE_ATOMIMAX) ||
+ opcode == TGSI_OPCODE_ATOMINC_WRAP || opcode == TGSI_OPCODE_ATOMDEC_WRAP))
+ return TGSI_TYPE_UNSIGNED;
+
switch (opcode) {
case TGSI_OPCODE_UIF:
case TGSI_OPCODE_TXF: