diff options
author | Dave Airlie <[email protected]> | 2019-06-26 15:45:50 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-07-07 16:23:54 +1000 |
commit | ab807859ea518eb3e1c0f365ed3ffe27025bb471 (patch) | |
tree | af2df0b8a518efe32a93c0bd200187de62ff370e /src/gallium/auxiliary/tgsi | |
parent | e21007f426e70f341909d42bc14f30a18298e963 (diff) |
tgsi: denote which load/store/atomic channels are unsigned
llvmpipe will need this info.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_info.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index d249b956ed3..37e16cca428 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -254,6 +254,18 @@ 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) + return TGSI_TYPE_UNSIGNED; + switch (opcode) { case TGSI_OPCODE_UIF: case TGSI_OPCODE_TXF: |