[Mesa-dev] [PATCH] tgsi: add some atomic opcodes to tgsi_opcode_infer_type

Gurchetan Singh gurchetansingh at chromium.org
Thu Jun 14 23:35:09 UTC 2018


We don't have cases for atomic types, some of which are explicitly
signed or unsigned.

The other opcodes could have uint or int return types, based on the
sources.
---
 src/gallium/auxiliary/tgsi/tgsi_info.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index 4aa658785cf..6f3cd9c5304 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -253,6 +253,9 @@ tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, uint src_idx)
       return TGSI_TYPE_SIGNED;
 
    switch (opcode) {
+   case TGSI_OPCODE_ATOMUADD:
+   case TGSI_OPCODE_ATOMUMAX:
+   case TGSI_OPCODE_ATOMUMIN:
    case TGSI_OPCODE_UIF:
    case TGSI_OPCODE_TXF:
    case TGSI_OPCODE_TXF_LZ:
@@ -268,6 +271,8 @@ tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, uint src_idx)
    case TGSI_OPCODE_U2I64:
    case TGSI_OPCODE_MEMBAR:
       return TGSI_TYPE_UNSIGNED;
+   case TGSI_OPCODE_ATOMIMAX:
+   case TGSI_OPCODE_ATOMIMIN:
    case TGSI_OPCODE_IMUL_HI:
    case TGSI_OPCODE_I2F:
    case TGSI_OPCODE_I2D:
-- 
2.13.5



More information about the mesa-dev mailing list