main: return 0 length when the queried program object's not linked
Signed-off-by: Xiong, James <james.xiong@intel.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
committed by
Timothy Arceri
parent
a83face48a
commit
08c1444c95
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user