OSDN Git Service

i965: Initialize disk shader cache if MESA_GLSL_CACHE_DISABLE is false
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 25 Feb 2017 10:30:06 +0000 (02:30 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 1 Nov 2017 06:46:53 +0000 (23:46 -0700)
commit1a61a8b9a7c7cdbb42b74a76c2ec825f7107cc83
tree5527eaff0dbb79bae3f4b5bc60f314be6d04728a
parentccb700526f647e0d02cb1c500b6aee083ba1b9d7
i965: Initialize disk shader cache if MESA_GLSL_CACHE_DISABLE is false

(Apologies for the double negative.)

For now, the shader cache is disabled by default on i965 to allow us
to verify its stability.

In other words, to enable the shader cache on i965, set
MESA_GLSL_CACHE_DISABLE to false or 0. If the variable is unset, then
the shader cache will be disabled.

We use the build-id of i965_dri.so for the timestamp, and the pci
device id for the device name.

v2:
 * Simplify code by forcing link to include build id sha. (Matt)

v3:
 * Don't use a for loop with snprintf for bin to hex. (Matt)
 * Assume fixed length render and timestamp string to further simplify
   code.

Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
docs/relnotes/17.4.0.html
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_disk_cache.c
src/mesa/drivers/dri/i965/brw_state.h