diff --git a/.pick_status.json b/.pick_status.json index caf9d537027..2ec991cd3b6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3904,7 +3904,7 @@ "description": "nir: fix invalid sampler search by texture id", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1a8dd84ec613f6e89ef5f180d79cddde0cd93d52", "notes": null diff --git a/src/compiler/nir/nir_remove_tex_shadow.c b/src/compiler/nir/nir_remove_tex_shadow.c index 4d37d64df10..37e9ee98cfd 100644 --- a/src/compiler/nir/nir_remove_tex_shadow.c +++ b/src/compiler/nir/nir_remove_tex_shadow.c @@ -86,7 +86,8 @@ remove_tex_shadow(struct nir_builder *b, nir_instr *instr, void *data) sampler->type = strip_shadow_with_array(sampler->type); sampler_deref->type = sampler->type; } else { - sampler = nir_find_variable_with_location(b->shader, nir_var_uniform, tex->sampler_index); + sampler = nir_find_sampler_variable_with_tex_index(b->shader, + tex->texture_index); sampler->type = strip_shadow_with_array(sampler->type); }