diff options
author | Samuel Pitoiset <[email protected]> | 2017-05-25 16:19:58 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-01 11:54:06 +0200 |
commit | d9460ad600781b1e4420b9b754a92c0b049e4453 (patch) | |
tree | ca5e741a92e4d4d0dcf37b862c8448804547498c /src/compiler/glsl | |
parent | e3054004433fa91d4ab195604f5fa28487d34096 (diff) |
glsl: handle memory qualifiers for struct with array of images
This handles a situation like:
struct {
image2D imgs[6];
} s;
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 2dec8bbc32b..65b6262f345 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -7402,9 +7402,10 @@ ast_process_struct_or_iface_block_members(exec_list *instructions, } /* Memory qualifiers are allowed on buffer and image variables, while - * the format qualifier is only accept for images. + * the format qualifier is only accepted for images. */ - if (var_mode == ir_var_shader_storage || field_type->is_image()) { + if (var_mode == ir_var_shader_storage || + field_type->without_array()->is_image()) { /* For readonly and writeonly qualifiers the field definition, * if set, overwrites the layout qualifier. */ @@ -7431,7 +7432,7 @@ ast_process_struct_or_iface_block_members(exec_list *instructions, fields[i].memory_restrict = qual->flags.q.restrict_flag || (layout && layout->flags.q.restrict_flag); - if (field_type->is_image()) { + if (field_type->without_array()->is_image()) { if (qual->flags.q.explicit_image_format) { if (qual->image_base_type != field_type->sampled_type) { _mesa_glsl_error(&loc, state, "format qualifier doesn't " |