[Mesa-dev] [PATCH] Revert "glsl: relax input->output validation for SSO programs"

Timothy Arceri tarceri at itsqueeze.com
Fri Feb 15 23:31:45 UTC 2019


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

But I think you should add something like the following to the commit 
message:

"This was fixed properly by commit ..."

Once you push "glsl/linker: don't fail non static used inputs without 
matching outputs"

On 9/2/19 4:06 am, Andres Gomez wrote:
> This reverts commit 1aa5738e666a9534c7e5b46f077327e6d647c64f.
> 
> This patch incorrectly asumed that for SSOs no inner interface
> matching check was needed.
> 
>  From the ARB_separate_shader_objects spec v.25:
> 
>    " With separable program objects, interfaces between shader stages
>      may involve the outputs from one program object and the inputs
>      from a second program object.  For such interfaces, it is not
>      possible to detect mismatches at link time, because the programs
>      are linked separately.  When each such program is linked, all
>      inputs or outputs interfacing with another program stage are
>      treated as active.  The linker will generate an executable that
>      assumes the presence of a compatible program on the other side of
>      the interface.  If a mismatch between programs occurs, no GL error
>      will be generated, but some or all of the inputs on the interface
>      will be undefined."
> 
> Fixes: 1aa5738e666 ("glsl: relax input->output validation for SSO programs")
> Cc: Tapani Pälli <tapani.palli at intel.com>
> Cc: Timothy Arceri <tarceri at itsqueeze.com>
> Cc: Ilia Mirkin <imirkin at alum.mit.edu>
> Cc: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> Cc: Ian Romanick <ian.d.romanick at intel.com>
> Signed-off-by: Andres Gomez <agomez at igalia.com>
> ---
>   src/compiler/glsl/link_varyings.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
> index 3969c0120b3..4efdfcbc4f6 100644
> --- a/src/compiler/glsl/link_varyings.cpp
> +++ b/src/compiler/glsl/link_varyings.cpp
> @@ -804,7 +804,7 @@ cross_validate_outputs_to_inputs(struct gl_context *ctx,
>                */
>               assert(!input->data.assigned);
>               if (input->data.used && !input->get_interface_type() &&
> -                !input->data.explicit_location && !prog->SeparateShader)
> +                !input->data.explicit_location)
>                  linker_error(prog,
>                               "%s shader input `%s' "
>                               "has no matching output in the previous stage\n",
> 


More information about the mesa-dev mailing list