mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
main: Clear shader program data whenever ProgramBinary is called
The GL_ARB_get_program_binary extension spec says:
"If ProgramBinary fails to load a binary, no error is generated, but
any information about a previous link or load of that program object
is lost."
v2:
* Re-initialize shProg->data after clear. (Jordan)
(Required after 6a72eba755)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
50c09a648f
commit
c1ff99fd70
1 changed files with 3 additions and 0 deletions
|
|
@ -2221,6 +2221,9 @@ _mesa_ProgramBinary(GLuint program, GLenum binaryFormat,
|
|||
if (!shProg)
|
||||
return;
|
||||
|
||||
_mesa_clear_shader_program_data(ctx, shProg);
|
||||
shProg->data = _mesa_create_shader_program_data();
|
||||
|
||||
/* Section 2.3.1 (Errors) of the OpenGL 4.5 spec says:
|
||||
*
|
||||
* "If a negative number is provided where an argument of type sizei or
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue