diff options
author | Marek Olšák <[email protected]> | 2016-10-20 01:22:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-24 21:41:38 +0200 |
commit | f35b1d156b302f3a8ac9f084f3db0394c35e6597 (patch) | |
tree | 3bda037c331dfb12de5db80fc3a88e21654540c6 /src/gallium/auxiliary | |
parent | a2f98dff140c0eebaddadcf70b571bb82872ac42 (diff) |
tgsi/scan: scan texture offset operands
This seems important considering how much we depend on some of the flags.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 00f55c75cc6..cbb3eec07fb 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -368,6 +368,22 @@ scan_instruction(struct tgsi_shader_info *info, is_interp_instruction, &is_mem_inst); } + if (fullinst->Instruction.Texture) { + for (i = 0; i < fullinst->Texture.NumOffsets; i++) { + struct tgsi_full_src_register src = {}; + + src.Register.File = fullinst->TexOffsets[i].File; + src.Register.Index = fullinst->TexOffsets[i].Index; + src.Register.SwizzleX = fullinst->TexOffsets[i].SwizzleX; + src.Register.SwizzleY = fullinst->TexOffsets[i].SwizzleY; + src.Register.SwizzleZ = fullinst->TexOffsets[i].SwizzleZ; + + /* The usage mask is suboptimal but should be safe. */ + scan_src_operand(info, fullinst, &src, 0, TGSI_WRITEMASK_XYZ, + false, &is_mem_inst); + } + } + /* check for indirect register writes */ for (i = 0; i < fullinst->Instruction.NumDstRegs; i++) { const struct tgsi_full_dst_register *dst = &fullinst->Dst[i]; |