diff options
author | Dave Airlie <[email protected]> | 2015-02-20 10:40:46 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-09-02 16:06:13 +1000 |
commit | ee67fd70c22c6389fd90886ef3ddf5bf6601b3a0 (patch) | |
tree | 2fd987c645de5af70077a5c1f49d5dc0161519e7 /src/gallium/auxiliary/tgsi/tgsi_scan.c | |
parent | 3bfa345c1eb3b0ec008d29fc0c62fe941412e4c6 (diff) |
tgsi/scan: add uses_doubles to tgsi scanner
This allows drivers to work out if a shader contains any
double opcodes easily.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 7523baf4ce0..9810b5468d9 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -100,6 +100,10 @@ tgsi_scan_shader(const struct tgsi_token *tokens, assert(fullinst->Instruction.Opcode < TGSI_OPCODE_LAST); info->opcode_count[fullinst->Instruction.Opcode]++; + if (fullinst->Instruction.Opcode >= TGSI_OPCODE_F2D && + fullinst->Instruction.Opcode <= TGSI_OPCODE_DSSG) + info->uses_doubles = true; + for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) { const struct tgsi_full_src_register *src = &fullinst->Src[i]; |