[Mesa-dev] [PATCH 2.5/3] glsl: only apply default stream to output blocks

Samuel Iglesias Gonsálvez siglesias at igalia.com
Fri Feb 26 06:41:34 UTC 2016



On Fri, Feb 26, 2016 at 11:51:16AM +1100, Timothy Arceri wrote:
> This is needed to allow invalid qualifier checks on inputs.
> 
> Cc: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> ---
>  I missed this in the first series as no tests hit this, I guess that means
>  we have no gs tests that have an input block with a layout qualifier :(
> 

Yes, you are right.  Would you mind adding one test for this case?

>  Transform feedback qualifiers I'm adding do a similar thing and I was
>  hitting this problem with them.
> 
>  src/compiler/glsl/glsl_parser_extras.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
> index ec180c0..2b1cc0d 100644
> --- a/src/compiler/glsl/glsl_parser_extras.cpp
> +++ b/src/compiler/glsl/glsl_parser_extras.cpp
> @@ -922,7 +922,8 @@ _mesa_ast_process_interface_block(YYLTYPE *locp,
>     block->layout.flags.i |= block_interface_qualifier;
>  
>     if (state->stage == MESA_SHADER_GEOMETRY &&
> -       state->has_explicit_attrib_stream()) {
> +       state->has_explicit_attrib_stream() &&
> +       block->layout.flags.q.out) {

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

I am thinking that we need to return a compiler error when setting
stream qualifier to an input block as glslangValidator does but in
a different patch... If you are busy, I can write it later today. Just
let me know.

Sam

>        /* Assign global layout's stream value. */
>        block->layout.flags.q.stream = 1;
>        block->layout.flags.q.explicit_stream = 0;
> -- 
> 2.5.0
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160226/c1c96239/attachment.sig>


More information about the mesa-dev mailing list