From 2009258796af63477b0680d74cfc55eaf4ef8558 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 11 Nov 2020 12:17:50 -0800 Subject: [PATCH] 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 Part-of: --- 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)