[Mesa-dev] [PATCH 0/2] Enable shader cache for ARB_get_program_binary
Jordan Justen
jordan.l.justen at intel.com
Mon Mar 12 00:25:54 UTC 2018
git://people.freedesktop.org/~jljusten/mesa program-binary-shader-cache
I found that when running DOTA2, most programs were skipping the
shader cache. It appears that since DOTA2 uses ARB_get_program_binary,
the programs loaded with ProgramBinary set the LinkStatus to
LINKING_SUCCESS.
Currently we never look in the shader cache when the LinkStatus is set
to LINKING_SUCCESS, so we would always fallback to generating the i965
gen program from NIR. We would still save the program to the shader
cache, but the next time DOTA2 ran, it would still use ProgramBinary,
and once again we would regenerate the program from NIR.
I also looked into whether we could also check the shader cache for
programs that have a LinkStatus of LINKING_SUCCESS. I think this might
be possible, but given that we skip the shader cache for programs
using transform feedback, and they set LinkStatus to LINKING_SUCCESS,
it was a bit more difficult to ensure things would always behave
correctly.
Cc: Timothy Arceri <tarceri at itsqueeze.com>
Jordan Justen (2):
glsl/serialize: Save shader program metadata sha1
main/program_binary: In ProgramBinary set link status as
LINKING_SKIPPED
src/compiler/glsl/serialize.cpp | 4 ++++
src/mesa/main/program_binary.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
--
2.16.1
More information about the mesa-dev
mailing list