[Mesa-dev] [PATCH 3/3] mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary

Ian Romanick idr at freedesktop.org
Sun Dec 21 12:08:45 PST 2014


From: Ian Romanick <ian.d.romanick at intel.com>

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
---
 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 c7e2633..92cafdc 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1719,6 +1719,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;
-- 
1.8.1.4



More information about the mesa-dev mailing list