Mesa (staging/18.1): i965, anv: Use INTEL_DEBUG for disk_cache driver flags
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 2 18:25:45 UTC 2018
Module: Mesa
Branch: staging/18.1
Commit: 2888dc653f9771fd8bb68b55ea304fa0bdfe694a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2888dc653f9771fd8bb68b55ea304fa0bdfe694a
Author: Jordan Justen <jordan.l.justen at intel.com>
Date: Fri Jul 20 23:52:59 2018 -0700
i965, anv: Use INTEL_DEBUG for disk_cache driver flags
Since various options within INTEL_DEBUG could impact code generation,
we need to set the disk cache driver_flags parameter based on the
INTEL_DEBUG flags in use.
An example that will affect the program generated by i965 is the
INTEL_DEBUG=nocompact option.
The DEBUG_DISK_CACHE_MASK value is added to mask the settings of
INTEL_DEBUG that can affect program generation.
v2:
* Use driver_flags (Tim)
* Also update Anvil (Jason)
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
(cherry picked from commit 2b3064c07316057755a3fbb732d0e315f25aff8a)
Merge conflicts resolved by Dylan
Pulled in to apply next patch
Conflicts:
src/intel/vulkan/anv_device.c
---
src/intel/common/gen_debug.h | 5 +++++
src/mesa/drivers/dri/i965/brw_disk_cache.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/intel/common/gen_debug.h b/src/intel/common/gen_debug.h
index da5b5a569d..6040bf7425 100644
--- a/src/intel/common/gen_debug.h
+++ b/src/intel/common/gen_debug.h
@@ -84,6 +84,11 @@ extern uint64_t INTEL_DEBUG;
#define DEBUG_COLOR (1ull << 40)
#define DEBUG_REEMIT (1ull << 41)
+/* These flags may affect program generation */
+#define DEBUG_DISK_CACHE_MASK \
+ (DEBUG_SHADER_TIME | DEBUG_NO16 | DEBUG_NO_DUAL_OBJECT_GS | DEBUG_NO8 | \
+ DEBUG_SPILL_FS | DEBUG_SPILL_VEC4 | DEBUG_NO_COMPACTION | DEBUG_DO32)
+
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "INTEL-MESA"
#include <cutils/log.h>
diff --git a/src/mesa/drivers/dri/i965/brw_disk_cache.c b/src/mesa/drivers/dri/i965/brw_disk_cache.c
index ee6067ca51..b32d824bf0 100644
--- a/src/mesa/drivers/dri/i965/brw_disk_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_disk_cache.c
@@ -437,6 +437,7 @@ brw_disk_cache_init(struct intel_screen *screen)
char timestamp[41];
_mesa_sha1_format(timestamp, id_sha1);
- screen->disk_cache = disk_cache_create(renderer, timestamp, 0);
+ const uint64_t driver_flags = INTEL_DEBUG & DEBUG_DISK_CACHE_MASK;
+ screen->disk_cache = disk_cache_create(renderer, timestamp, driver_flags);
#endif
}
More information about the mesa-commit
mailing list