On 13/03/18 04:31, Emil Velikov wrote:
On 12 March 2018 at 00:25, Jordan Justen <jordan.l.jus...@intel.com> wrote:
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 <tarc...@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(-)

Jordan, Timothy,

Can you please add the respective Fixes tags before pushing these or
equivalent fixes.

I think these are more improvements rather than bug fixes. While they might be fine it's probably better to avoid applying them to stable.

Tim



Thanks
Emil

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to