On Mon, 2015-11-23 at 23:24 +1100, Timothy Arceri wrote: > From: Timothy Arceri <timothy.arc...@collabora.com> > > Enables 200+ dEQP SSO tests to proceed passed validation, > while not regressing ES31-CTS.sepshaderobjs.PipelineApi. > > Cc: Tapani Pälli <tapani.pa...@intel.com> > Cc: Gregory Hainaut <gregory.hain...@gmail.com> > --- > src/mesa/main/pipelineobj.c | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/main/pipelineobj.c > b/src/mesa/main/pipelineobj.c > index 90dff13..99e1491 100644 > --- a/src/mesa/main/pipelineobj.c > +++ b/src/mesa/main/pipelineobj.c > @@ -646,7 +646,7 @@ _mesa_GetProgramPipelineiv(GLuint pipeline, > GLenum pname, GLint *params) > return; > case GL_VALIDATE_STATUS: > /* If pipeline is not bound, return initial value 0. */
Whoops, I've removed this comment locally also. > - *params = (ctx->_Shader->Name != pipe->Name) ? 0 : pipe > ->Validated; > + *params = pipe->Validated; > return; > case GL_VERTEX_SHADER: > *params = pipe->CurrentProgram[MESA_SHADER_VERTEX] > @@ -858,6 +858,29 @@ _mesa_validate_program_pipeline(struct > gl_context* ctx, > } > } > > + /* Section 11.1.3.11 (Validation) of the OpenGL 4.5 spec says: > + * > + * "An INVALID_OPERATION error is generated by any command > that trans- > + * fers vertices to the GL or launches compute work if the > current set > + * of active program objects cannot be executed, for reasons > including: > + * > + * ... > + * > + * - There is no current program object specified by > UseProgram, > + * there is a current program pipeline object, and that > object is > + * empty (no executable code is installed for any stage). > + */ > + bool program_empty = true; > + for (i = 0; i < MESA_SHADER_STAGES; i++) { > + if (pipe->CurrentProgram[i]) { > + program_empty = false; > + break; > + } > + } > + if(program_empty) { > + goto err; > + } > + > /* Section 2.11.11 (Shader Execution), subheading "Validation," > of the > * OpenGL 4.1 spec says: > * _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev