[Mesa-dev] [PATCH v2 36/64] st/glsl_to_tgsi: teach rename_temp_registers() about bindless samplers
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue May 30 20:36:07 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 38edbc9296..4e93404761 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4796,6 +4796,12 @@ glsl_to_tgsi_visitor::rename_temp_registers(int num_renames, struct rename_reg_p
inst->tex_offsets[j].index = renames[k].new_reg;
}
+ if (inst->resource.file == PROGRAM_TEMPORARY) {
+ for (k = 0; k < num_renames; k++)
+ if (inst->resource.index == renames[k].old_reg)
+ inst->resource.index = renames[k].new_reg;
+ }
+
for (j = 0; j < num_inst_dst_regs(inst); j++) {
if (inst->dst[j].file == PROGRAM_TEMPORARY)
for (k = 0; k < num_renames; k++)
--
2.13.0
More information about the mesa-dev
mailing list