Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
It would also be nice to have a piglit test for this case. I assume mesa probably crashes without this patch?
On 27/04/18 11:39, James Xiong wrote:
From: "Xiong, James" <james.xi...@intel.com> Signed-off-by: Xiong, James <james.xi...@intel.com> --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 44b18af..caa4254 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -837,7 +837,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, *params = shProg->BinaryRetreivableHint; return; case GL_PROGRAM_BINARY_LENGTH: - if (ctx->Const.NumProgramBinaryFormats == 0) { + if (ctx->Const.NumProgramBinaryFormats == 0 || !shProg->data->LinkStatus) { *params = 0; } else { _mesa_get_program_binary_length(ctx, shProg, params);
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev