Mesa (10.4): mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary

Emil Velikov evelikov at kemper.freedesktop.org
Fri Mar 6 19:42:33 UTC 2015


Module: Mesa
Branch: 10.4
Commit: a369361f9e0b9d781e77a05c85462479b6db9d04
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a369361f9e0b9d781e77a05c85462479b6db9d04

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Sun Dec 21 12:06:23 2014 -0800

mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary

There are no binary formats supported, so what are you doing?  At least
this gives the application developer some feedback about what's going
on.  The spec gives no guidance about what to do in this scenario.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87516
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Acked-by: Leight Bade <leith at mapbox.com>
(cherry picked from commit f591712efeb9a757379d1e89907e2147749aaf6c)

---

 src/mesa/main/shaderapi.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 1fec416..0ca4f58 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1720,6 +1720,8 @@ _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
    }
 
    *length = 0;
+   _mesa_error(ctx, GL_INVALID_OPERATION,
+               "glGetProgramBinary(driver supports zero binary formats)");
 
    (void) binaryFormat;
    (void) binary;




More information about the mesa-commit mailing list