From 8fcdb71d8c9e6a0d9d9b70550bb764b654377714 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 25 Jul 2018 14:31:05 -0700 Subject: intel/compiler: Add brw_get_compiler_config_value for disk cache During code review, Jason pointed out that: 2b3064c0731 "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 Signed-off-by: Jordan Justen Reviewed-by: Kenneth Graunke --- src/intel/compiler/brw_compiler.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/intel/compiler/brw_compiler.h') diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index 4797c9cf06d..c510d34ce2e 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -1214,6 +1214,18 @@ DEFINE_PROG_DATA_DOWNCAST(sf) struct brw_compiler * brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo); +/** + * Returns a compiler configuration for use with disk shader cache + * + * This value only needs to change for settings that can cause different + * program generation between two runs on the same hardware. + * + * For example, it doesn't need to be different for gen 8 and gen 9 hardware, + * but it does need to be different if INTEL_DEBUG=nocompact is or isn't used. + */ +uint64_t +brw_get_compiler_config_value(const struct brw_compiler *compiler); + unsigned brw_prog_data_size(gl_shader_stage stage); -- cgit v1.2.3