[Mesa-dev] [PATCH] tgsi/scan: fix uses_double

Marek Olšák maraeo at gmail.com
Tue Aug 22 15:42:58 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/auxiliary/tgsi/tgsi_scan.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 2fd7d7c..db87ce3 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -450,22 +450,28 @@ scan_instruction(struct tgsi_shader_info *info,
             info->uses_linear_opcode_interp_offset = TRUE;
             break;
          case TGSI_OPCODE_INTERP_SAMPLE:
             info->uses_linear_opcode_interp_sample = TRUE;
             break;
          }
          break;
       }
    }
 
-   if (fullinst->Instruction.Opcode >= TGSI_OPCODE_F2D &&
-       fullinst->Instruction.Opcode <= TGSI_OPCODE_DSSG)
+   if ((fullinst->Instruction.Opcode >= TGSI_OPCODE_F2D &&
+        fullinst->Instruction.Opcode <= TGSI_OPCODE_DSSG) ||
+       fullinst->Instruction.Opcode == TGSI_OPCODE_DFMA ||
+       fullinst->Instruction.Opcode == TGSI_OPCODE_DDIV ||
+       fullinst->Instruction.Opcode == TGSI_OPCODE_D2U64 ||
+       fullinst->Instruction.Opcode == TGSI_OPCODE_D2I64 ||
+       fullinst->Instruction.Opcode == TGSI_OPCODE_U642D ||
+       fullinst->Instruction.Opcode == TGSI_OPCODE_I642D)
       info->uses_doubles = TRUE;
 
    for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) {
       scan_src_operand(info, fullinst, &fullinst->Src[i], i,
                        tgsi_util_get_inst_usage_mask(fullinst, i),
                        is_interp_instruction, &is_mem_inst);
    }
 
    if (fullinst->Instruction.Texture) {
       for (i = 0; i < fullinst->Texture.NumOffsets; i++) {
-- 
2.7.4



More information about the mesa-dev mailing list