diff options
author | Ian Romanick <[email protected]> | 2016-05-19 10:27:12 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-05-26 16:23:53 -0700 |
commit | 326a269c7778e2921d48e5d1d2a3683331a1173d (patch) | |
tree | d18a9f9fa4b9151447401f4d41a78a796cce1daf /src/mesa/main/pipelineobj.c | |
parent | 3722c76001ae3190ce7a813e02b5f1eefa5d07eb (diff) |
mesa: Only validate SSO shader IO in OpenGL ES or debug context
v2: Move later in series to avoid issues with Gallium drivers and debug
contexts. Suggested by Ilia.
Signed-off-by: Ian Romanick <[email protected]>
Suggested-by: Timothy Arceri <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/pipelineobj.c')
-rw-r--r-- | src/mesa/main/pipelineobj.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index b1501984c9b..5a46cfe2dcd 100644 --- a/src/mesa/main/pipelineobj.c +++ b/src/mesa/main/pipelineobj.c @@ -906,7 +906,8 @@ _mesa_validate_program_pipeline(struct gl_context* ctx, /* Validate inputs against outputs, this cannot be done during linking * since programs have been linked separately from each other. * - * From OpenGL 4.5 Core spec: + * Section 11.1.3.11 (Validation) of the OpenGL 4.5 Core Profile spec says: + * * "Separable program objects may have validation failures that cannot be * detected without the complete program pipeline. Mismatched interfaces, * improper usage of program objects together, and the same @@ -914,8 +915,21 @@ _mesa_validate_program_pipeline(struct gl_context* ctx, * program objects." * * OpenGL ES 3.1 specification has the same text. + * + * Section 11.1.3.11 (Validation) of the OpenGL ES spec also says: + * + * An INVALID_OPERATION error is generated by any command that transfers + * vertices to the GL or launches compute work if the current set of + * active program objects cannot be executed, for reasons including: + * + * * The current program pipeline object contains a shader interface + * that doesn't have an exact match (see section 7.4.1) + * + * Based on this, only perform the most-strict checking on ES or when the + * application has created a debug context. */ - if (!_mesa_validate_pipeline_io(pipe)) + if ((_mesa_is_gles(ctx) || (ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT)) && + !_mesa_validate_pipeline_io(pipe)) return GL_FALSE; pipe->Validated = GL_TRUE; |