Module: Mesa
Branch: master
Commit: 08c1444c9582f8654f9c688b79230ba2acbc2027
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=08c1444c9582f8654f9c688b79230ba2acbc2027

Author: Xiong, James <[email protected]>
Date:   Thu Apr 26 18:39:57 2018 -0700

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]>

---

 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 44b18af492..caa42541ca 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-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to