X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fcontext.c;h=860ae8605314766f04d90ed9ac3ed4aad4a52874;hb=1c290680742ce5cb9a0a1019d0f971689335aabc;hp=5d580fab78695b25208895ecb11efa1f67b18505;hpb=95426b28ac716dafff4c797f66949244896a94fd;p=mesa.git diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 5d580fab786..860ae860531 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1841,6 +1841,7 @@ shader_linked_or_absent(struct gl_context *ctx, * Prior to drawing anything with glBegin, glDrawArrays, etc. this function * is called to see if it's valid to render. This involves checking that * the current shader is valid and the framebuffer is complete. + * It also check the current pipeline object is valid if any. * If an error is detected it'll be recorded here. * \return GL_TRUE if OK to render, GL_FALSE if not */ @@ -1892,6 +1893,15 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) } } + /* A pipeline object is bound */ + if (ctx->_Shader->Name && !ctx->_Shader->Validated) { + /* Error message will be printed inside _mesa_validate_program_pipeline. + */ + if (!_mesa_validate_program_pipeline(ctx, ctx->_Shader, GL_TRUE)) { + return GL_FALSE; + } + } + if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "%s(incomplete framebuffer)", where);