summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-11-07 02:11:28 -0800
committerTimothy Arceri <[email protected]>2017-12-08 16:59:25 +1100
commitc1ff99fd70cd2ceb2cac4723e4fd5efc93834746 (patch)
tree5bb90d50b14659149a3b2d467e1857af0349a61e /src
parent50c09a648f6d389cdc1657a0ccf54cf263aa8aa6 (diff)
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 6a72eba755fea15a0d97abb913a6315d9d32e274) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/shaderapi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 51031e12ec9..4607cbb99bc 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -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