mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
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:
parent
e30ed18215
commit
7ee54ad057
1 changed files with 9 additions and 6 deletions
|
|
@ -2199,12 +2199,15 @@ _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
|
|||
return;
|
||||
}
|
||||
|
||||
*length = 0;
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramBinary(driver supports zero binary formats)");
|
||||
|
||||
(void) binaryFormat;
|
||||
(void) binary;
|
||||
if (ctx->Const.NumProgramBinaryFormats == 0) {
|
||||
*length = 0;
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramBinary(driver supports zero binary formats)");
|
||||
} else {
|
||||
_mesa_get_program_binary(ctx, shProg, bufSize, length, binaryFormat,
|
||||
binary);
|
||||
assert(*length == 0 || *binaryFormat == GL_PROGRAM_BINARY_FORMAT_MESA);
|
||||
}
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue