mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary
authorIan Romanick <ian.d.romanick@intel.com>
Sun, 21 Dec 2014 20:06:23 +0000 (12:06 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Sun, 11 Jan 2015 23:01:09 +0000 (12:01 +1300)
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@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87516
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Leight Bade <leith@mapbox.com>
src/mesa/main/shaderapi.c

index 656ee112e559b021cfaf6eeae5e6608c128f6c2f..118e8a74209e1142c48150f80b1681978c5080d8 100644 (file)
@@ -1718,6 +1718,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;