mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
nir: fix invalid sampler search by texture id
Sampler id cannot be mapped to a uniform object location Fixes:1a8dd84ec6("nir: Propagate the type sampler type change to the used variable.") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9793 Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25145> (cherry picked from commitb8a54c50a6)
This commit is contained in:
parent
66e20bb824
commit
684ce43507
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue