aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorXiong, James <[email protected]>2018-04-26 18:39:57 -0700
committerTimothy Arceri <[email protected]>2018-05-10 09:34:19 +1000
commit08c1444c9582f8654f9c688b79230ba2acbc2027 (patch)
tree6fbfbee3825ede11b10a71e6414468cf7d3a712d /src/mesa/main/shaderapi.c
parenta83face48ae5ce762d8c48a7485dc75b45dccf58 (diff)
main: return 0 length when the queried program object's not linked
Signed-off-by: Xiong, James <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 44b18af4927..caa42541cad 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);