diff --git a/.pick_status.json b/.pick_status.json index e50dc6ffda0..b26e0f5ef42 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1764,7 +1764,7 @@ "description": "ntt: lower indirect tesslevels in ntt", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "84006587d7e5b87526a9b83135393251afeef777", "notes": null diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index 521a643d0fb..4cf7fbc20c4 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -3898,6 +3898,15 @@ const void *nir_to_tgsi_options(struct nir_shader *s, NIR_PASS_V(s, nir_remove_dead_variables, nir_var_shader_in, NULL); } + /* Lower tesslevel indirect derefs for tessellation shader. + * tesslevels are now a compact array variable and nir expects a constant + * array index into the compact array variable. + */ + if (s->info.stage == MESA_SHADER_TESS_CTRL || + s->info.stage == MESA_SHADER_TESS_EVAL) { + NIR_PASS_V(s, nir_lower_indirect_derefs, 0 , UINT32_MAX); + } + NIR_PASS_V(s, nir_lower_io, nir_var_shader_in | nir_var_shader_out, type_size, (nir_lower_io_options)0);