[Mesa-dev] [RFC PATCH 36/65] st/glsl_to_tgsi: teach rename_temp_registers() about bindless samplers

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri May 19 16:52:41 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.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 ee1afdcd08..c69eefe013 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4797,6 +4797,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