OSDN Git Service

glsl: fix gl_nir_set_uniform_initializers() for image arrays
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 10 Feb 2020 00:22:32 +0000 (11:22 +1100)
committerDylan Baker <dylan@pnwbakers.com>
Fri, 14 Feb 2020 17:37:57 +0000 (09:37 -0800)
commit7b42cb219d58dd8d38f1ae722695789422c6ed2a
tree6ac72fa1dfc62efb4e94655f686c683039901aca
parent1c3744877b80b4bad5116e280c849c439f3d02ba
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@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 commit 676869e1d4bb1660430fcdb99443238a7de50eb8)
.pick_status.json
src/compiler/glsl/gl_nir_link_uniform_initializers.c