summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-01-11 14:08:05 -0800
committerKenneth Graunke <[email protected]>2013-01-12 15:35:38 -0800
commit4a6753926f51accd6f71d9caea18b15a99b8be24 (patch)
tree2bdb08b3286d7fff2f4475a683b821fd8f26d605 /src/mesa
parent67ef755908375661c2cc1e7a26922682b981dc97 (diff)
i965: Add an INTEL_DEBUG=no16 option.
Often when debugging, I don't want to see SIMD16 shaders. It makes INTEL_DEBUG=vs/fs output much easier to read, especially when a program dumps many shaders. Plus, I also want to verify that SIMD8 works before even considering SIMD16. v2: Fix the likeliness check (caught by Chris and Eric). Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp3
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ae26d07e03d..0d2dde72be4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2585,7 +2585,8 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c,
exec_list *simd16_instructions = NULL;
fs_visitor v2(brw, c, prog, fp, 16);
- if (intel->gen >= 5 && c->prog_data.nr_pull_params == 0) {
+ bool no16 = INTEL_DEBUG & DEBUG_NO16;
+ if (intel->gen >= 5 && c->prog_data.nr_pull_params == 0 && likely(!no16)) {
v2.import_uniforms(&v);
if (!v2.run()) {
perf_debug("16-wide shader failed to compile, falling back to "
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index f3f99836e9b..798fc6ae884 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -493,6 +493,7 @@ static const struct dri_debug_control debug_control[] = {
{ "clip", DEBUG_CLIP },
{ "aub", DEBUG_AUB },
{ "shader_time", DEBUG_SHADER_TIME },
+ { "no16", DEBUG_NO16 },
{ NULL, 0 }
};
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index dbc5ea02bcf..7ce7c2542a3 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -444,6 +444,7 @@ extern int INTEL_DEBUG;
#define DEBUG_CLIP 0x2000000
#define DEBUG_AUB 0x4000000
#define DEBUG_SHADER_TIME 0x8000000
+#define DEBUG_NO16 0x20000000
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "INTEL-MESA"