main: add binary support to GetProgramBinary
V2: call generic _mesa_get_program_binary() helper rather than driver function directly to allow greater code sharing. Signed-off-by: Timothy Arceri <tarceri@itsqueeze.com> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> (v1) Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1) Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:

committed by
Timothy Arceri

parent
e30ed18215
commit
7ee54ad057
@@ -2199,12 +2199,15 @@ _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctx->Const.NumProgramBinaryFormats == 0) {
|
||||||
*length = 0;
|
*length = 0;
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
"glGetProgramBinary(driver supports zero binary formats)");
|
"glGetProgramBinary(driver supports zero binary formats)");
|
||||||
|
} else {
|
||||||
(void) binaryFormat;
|
_mesa_get_program_binary(ctx, shProg, bufSize, length, binaryFormat,
|
||||||
(void) binary;
|
binary);
|
||||||
|
assert(*length == 0 || *binaryFormat == GL_PROGRAM_BINARY_FORMAT_MESA);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
|
Reference in New Issue
Block a user