[Mesa-dev] [PATCH 23/24] i965: Add do32 debug option.
Francisco Jerez
currojerez at riseup.net
Fri May 27 03:46:28 UTC 2016
The do32 INTEL_DEBUG option causes the back-end to try to generate a
SIMD32 program when compiling a compute shader regardless of the
specified compute shader workgroup size, which will be useful for
testing SIMD32 code generation in the most common case in which the
workgroup size doesn't exceed the SIMD16 limit so SIMD32 codegen
wouldn't be automatically enabled.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
src/mesa/drivers/dri/i965/intel_debug.c | 1 +
src/mesa/drivers/dri/i965/intel_debug.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 7002346..1b180ec 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -6551,7 +6551,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
NULL, /* Never used in core profile */
shader, 32, shader_time_index);
if (!fail_msg && v8.max_dispatch_width >= 32 &&
- simd_required == 32) {
+ (simd_required == 32 || (INTEL_DEBUG & DEBUG_DO32))) {
/* Try a SIMD32 compile */
if (simd_required <= 8)
v32.import_uniforms(&v8);
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
index e08c296..2589c43 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.c
+++ b/src/mesa/drivers/dri/i965/intel_debug.c
@@ -79,6 +79,7 @@ static const struct debug_control debug_control[] = {
{ "ds", DEBUG_TES },
{ "tes", DEBUG_TES },
{ "l3", DEBUG_L3 },
+ { "do32", DEBUG_DO32 },
{ NULL, 0 }
};
diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
index b7b5111..22ad834 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.h
+++ b/src/mesa/drivers/dri/i965/intel_debug.h
@@ -72,6 +72,7 @@ extern uint64_t INTEL_DEBUG;
#define DEBUG_TCS (1ull << 36)
#define DEBUG_TES (1ull << 37)
#define DEBUG_L3 (1ull << 38)
+#define DEBUG_DO32 (1ull << 39)
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "INTEL-MESA"
--
2.7.3
More information about the mesa-dev
mailing list