mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 18:00:24 +01:00
st/glsl_to_tgsi: fix getting the image type for array of structs
Since array splitting for AoA is disabled, we have to retrieve the type of the first non-array type when an array of images is declared inside a structure. Otherwise, it will hit an assert in glsl_type::sampler_index() because it expects either a sampler or an image type. This fixes a regression in the following piglit test: arb_bindless_texture/compiler/images/arrays-of-struct.frag Fixes:57165f2ef8("glsl: disable array splitting for AoA") Cc: 17.2 <mesa-stable@lists.freedesktop.org> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commitf99e9335e2)
This commit is contained in:
parent
e62eddcdbe
commit
d466a70532
1 changed files with 1 additions and 1 deletions
|
|
@ -3790,7 +3790,7 @@ get_image_qualifiers(ir_dereference *ir, const glsl_type **type,
|
|||
for (unsigned i = 0; i < struct_type->length; i++) {
|
||||
if (!strcmp(struct_type->fields.structure[i].name,
|
||||
deref_record->field)) {
|
||||
*type = struct_type->fields.structure[i].type;
|
||||
*type = struct_type->fields.structure[i].type->without_array();
|
||||
*memory_coherent =
|
||||
struct_type->fields.structure[i].memory_coherent;
|
||||
*memory_volatile =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue