[Mesa-dev] [PATCH 2/6] glsl: handle format layout qualifiers for struct with array of images

Timothy Arceri tarceri at itsqueeze.com
Wed May 31 00:27:15 UTC 2017


Patches 1-2:

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

On 26/05/17 04:07, Samuel Pitoiset wrote:
> This handles a situation like:
> 
> struct {
>     layout (r32f) image2D imgs[6];
> } s;
> 
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>   src/compiler/glsl/ast_to_hir.cpp | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
> index 65b6262f34..e451bda801 100644
> --- a/src/compiler/glsl/ast_to_hir.cpp
> +++ b/src/compiler/glsl/ast_to_hir.cpp
> @@ -7434,7 +7434,8 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
>   
>               if (field_type->without_array()->is_image()) {
>                  if (qual->flags.q.explicit_image_format) {
> -                  if (qual->image_base_type != field_type->sampled_type) {
> +                  if (qual->image_base_type !=
> +                      field_type->without_array()->sampled_type) {
>                        _mesa_glsl_error(&loc, state, "format qualifier doesn't "
>                                         "match the base data type of the image");
>                     }
> 


More information about the mesa-dev mailing list