From: Ian Romanick Date: Sun, 21 Dec 2014 20:06:23 +0000 (-0800) Subject: mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f591712efeb9a757379d1e89907e2147749aaf6c;p=mesa.git 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 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87516 Reviewed-by: Kenneth Graunke Acked-by: Leight Bade --- diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 656ee112e55..118e8a74209 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -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;