diff options
author | Jordan Justen <[email protected]> | 2018-07-24 17:13:52 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2018-08-01 23:30:49 -0700 |
commit | 3887700dfd7597fba654a4a713c274213a4a8755 (patch) | |
tree | 13a345ed354272f47ce5ad2162f1f058993cc642 /src/mesa/drivers/dri | |
parent | bea4722c2e387162d677eb8fff726be44d720cdb (diff) |
i965: Disable shader cache with INTEL_DEBUG=shader_time
Shader time hard codes an index of the shader time buffer within the
gen program.
In order to support shader time in the disk shader cache, we'd need to
add the shader time index into the program key. This should work, but
probably is not worth it for this particular debug feature.
Therefore, let's just disable the disk shader cache if the shader time
debug feature is used.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106382
Fixes: 96fe36f7acc "i965: Enable disk shader cache by default"
Cc: Eero Tamminen <[email protected]>
Cc: Kenneth Graunke <[email protected]>
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_disk_cache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_disk_cache.c b/src/mesa/drivers/dri/i965/brw_disk_cache.c index 8f1b064fd61..0797e6eac44 100644 --- a/src/mesa/drivers/dri/i965/brw_disk_cache.c +++ b/src/mesa/drivers/dri/i965/brw_disk_cache.c @@ -377,6 +377,9 @@ void brw_disk_cache_init(struct intel_screen *screen) { #ifdef ENABLE_SHADER_CACHE + if (INTEL_DEBUG & DEBUG_DISK_CACHE_DISABLE_MASK) + return; + /* array length: print length + null char + 1 extra to verify it is unused */ char renderer[11]; MAYBE_UNUSED int len = snprintf(renderer, sizeof(renderer), "i965_%04x", |