Mesa (master): intel/compiler: Fix passthrough TCS regressions from program rename

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 12 05:49:07 UTC 2020


Module: Mesa
Branch: master
Commit: 2009258796af63477b0680d74cfc55eaf4ef8558
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2009258796af63477b0680d74cfc55eaf4ef8558

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 11 12:17:50 2020 -0800

intel/compiler: Fix passthrough TCS regressions from program rename

In commit eda3e4e055e240a14c6ad4bdbde544c6348fc01d, Eric added names
to various programs.  In that patch, he also renamed our passthrough
TCS shader from "passthrough" to "passthrough TCS".  The passthrough
TCS directly supplies the VUE headers rather than doing the whole
"patch parameters are in backwards order" reswizzling dance.

We failed to detect this and started trying to supply vec4s starting
at component 3, leading to a stack smash on an array of 7 sources,
not to mention the values were being put in the wrong place.

Easy fix: update the code for the new name.

Fixes: eda3e4e055e ("nir/builder: Add a name format arg to nir_builder_init_simple_shader().")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3777
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7564>

---

 src/intel/compiler/brw_nir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 92d6cd0313b..b83a8800063 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -107,7 +107,7 @@ remap_patch_urb_offsets(nir_block *block, nir_builder *b,
                         GLenum tes_primitive_mode)
 {
    const bool is_passthrough_tcs = b->shader->info.name &&
-      strcmp(b->shader->info.name, "passthrough") == 0;
+      strcmp(b->shader->info.name, "passthrough TCS") == 0;
 
    nir_foreach_instr_safe(instr, block) {
       if (instr->type != nir_instr_type_intrinsic)



More information about the mesa-commit mailing list