From dd1ec664f5fda63bc6af1f1aa1f36ab6b8c44048 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 5 May 2017 10:31:27 +0200 Subject: [PATCH] st/glsl_to_tgsi: teach rename_temp_registers() about bindless samplers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- 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 834b6c6dec4..24d417d6709 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4840,6 +4840,12 @@ glsl_to_tgsi_visitor::rename_temp_registers(struct rename_reg_pair *renames) } } + if (inst->resource.file == PROGRAM_TEMPORARY) { + int old_idx = inst->resource.index; + if (renames[old_idx].valid) + inst->resource.index = renames[old_idx].new_reg; + } + for (j = 0; j < num_inst_dst_regs(inst); j++) { if (inst->dst[j].file == PROGRAM_TEMPORARY) { int old_idx = inst->dst[j].index; -- 2.30.2