main: Clear shader program data whenever ProgramBinary is called
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 7 Nov 2017 10:11:28 +0000 (02:11 -0800)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 8 Dec 2017 05:59:25 +0000 (16:59 +1100)
commitc1ff99fd70cd2ceb2cac4723e4fd5efc93834746
tree5bb90d50b14659149a3b2d467e1857af0349a61e
parent50c09a648f6d389cdc1657a0ccf54cf263aa8aa6
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 <jordan.l.justen@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/shaderapi.c