mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
glsl: fix gl_nir_set_uniform_initializers() for image arrays
The if was incorrectly checking for an image type on what could be an array of images. Here we change it to use the type stored in uniform storage which has already been stripped of arrays, this is what the above code for samplers does also. Fixes:2bf91733fc("nir/linker: Set the uniform initial values") Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3757> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3757> (cherry picked from commit676869e1d4)
This commit is contained in:
parent
1c3744877b
commit
7b42cb219d
2 changed files with 2 additions and 2 deletions
|
|
@ -112,7 +112,7 @@
|
|||
"description": "glsl: fix gl_nir_set_uniform_initializers() for image arrays",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "2bf91733fcb5ff8f74d71de03feeb5f3d664d199"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ set_opaque_binding(struct set_opaque_binding_closure *data,
|
|||
storage->storage[i].i;
|
||||
}
|
||||
}
|
||||
} else if (glsl_type_is_image(type)) {
|
||||
} else if (glsl_type_is_image(storage->type)) {
|
||||
for (unsigned i = 0; i < elements; i++) {
|
||||
const unsigned index = storage->opaque[sh].index + i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue