[Mesa-dev] [PATCH 10/11] mesa: Add GetProgramiv support for GL_PROGRAM_BINARY_LENGTH
Ian Romanick
idr at freedesktop.org
Wed Jan 2 13:35:04 PST 2013
On 01/02/2013 12:53 PM, Brian Paul wrote:
> On 12/19/2012 05:14 PM, Ian Romanick wrote:
>> From: Ian Romanick<ian.d.romanick at intel.com>
>>
>> Signed-off-by: Ian Romanick<ian.d.romanick at intel.com>
>> ---
>> src/mesa/main/shaderapi.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
>> index 39a883e..c7934d7 100644
>> --- a/src/mesa/main/shaderapi.c
>> +++ b/src/mesa/main/shaderapi.c
>> @@ -595,6 +595,9 @@ get_programiv(struct gl_context *ctx, GLuint
>> program, GLenum pname, GLint *param
>>
>> *params = shProg->BinaryRetreivableHint;
>> return;
>> + case GL_PROGRAM_BINARY_LENGTH:
>> + *params = 0;
>> + return;
>> default:
>> break;
>> }
>
> Does this query need an extension/API check?
The next patch adds the extension string tracking. I've chosen always
enable this extension when ARB_shader_objects is available.
Technically, the function should check for that extension at the top,
but it currently doesn't. The new enum isn't any more broken than
GL_LINK_STATUS, GL_DELETE_STATUS, etc. If shaders aren't available, the
call to _mesa_lookup_shader_program will fail, and GL_INVALID_VALUE will
get generated (instead of GL_INVALID_ENUM or GL_INVALID_OPERATION).
> -Brian
>
More information about the mesa-dev
mailing list