Mesa (master): glsl: fix gl_nir_set_uniform_initializers() for image arrays
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 14 01:54:34 UTC 2020
Module: Mesa
Branch: master
Commit: 676869e1d4bb1660430fcdb99443238a7de50eb8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=676869e1d4bb1660430fcdb99443238a7de50eb8
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Mon Feb 10 11:22:32 2020 +1100
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: 2bf91733fcb5 ("nir/linker: Set the uniform initial values")
Reviewed-by: Alejandro Piñeiro <apinheiro at 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>
---
src/compiler/glsl/gl_nir_link_uniform_initializers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/gl_nir_link_uniform_initializers.c b/src/compiler/glsl/gl_nir_link_uniform_initializers.c
index 1c4529c9307..752eedb63aa 100644
--- a/src/compiler/glsl/gl_nir_link_uniform_initializers.c
+++ b/src/compiler/glsl/gl_nir_link_uniform_initializers.c
@@ -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;
More information about the mesa-commit
mailing list