glsl/serialize: Save shader program metadata sha1
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 10 Mar 2018 09:59:47 +0000 (01:59 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 19 Mar 2018 16:57:09 +0000 (09:57 -0700)
commitb5baaee0d6b06a2c021d1b2673a056ada733a2a9
tree43c8a94a2aaf33bcb8d30da4d6687e6a6c471418
parent9b473f9e3cc6820a6d1441e046be5ece22e03d17
glsl/serialize: Save shader program metadata sha1

When the shader cache is used, this can be generated. In fact, the
shader cache uses this sha1 to lookup the serialized GL shader
program.

If a GL shader program is restored with ProgramBinary, the shaders are
not available, and therefore the correct sha1 cannot be generated. If
this is restored, then we can use the shader cache to restore the
binary programs to the program that was loaded with ProgramBinary.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/compiler/glsl/serialize.cpp