intel/compiler: Add brw_get_compiler_config_value for disk cache

During code review, Jason pointed out that:

2b3064c073 "i965, anv: Use INTEL_DEBUG for disk_cache driver flags"

Didn't account for INTEL_SCALER_* environment variables.

To fix this, let the compiler return the disk_cache driver flags.

Another possible fix would be to pull the INTEL_SCALER_* into
INTEL_DEBUG bits, but as we are currently using 41 of 64 bits, I
didn't think it was a good use of 4 more of these bits. (5 since
INTEL_PRECISE_TRIG needs to be accounted for as well.)

Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jordan Justen
2018-07-25 14:31:05 -07:00
parent 3887700dfd
commit 8fcdb71d8c
4 changed files with 43 additions and 2 deletions

View File

@@ -286,7 +286,8 @@ anv_physical_device_init_disk_cache(struct anv_physical_device *device)
char timestamp[41];
_mesa_sha1_format(timestamp, device->driver_build_sha1);
const uint64_t driver_flags = INTEL_DEBUG & DEBUG_DISK_CACHE_MASK;
const uint64_t driver_flags =
brw_get_compiler_config_value(device->compiler);
device->disk_cache = disk_cache_create(renderer, timestamp, driver_flags);
#else
device->disk_cache = NULL;