summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-07-25 19:28:59 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-11-04 10:18:56 -0800
commit0f0304f023554f2efa9c48aee5b573dcf7c8e20a (patch)
tree1bafbae669966f539eeb0c34f95ca0d5b17cef71
parent45067f95838c4817cef2ccdf5bfba72e24328750 (diff)
i965: Add INTEL_DEBUG=hs,ds flags for debugging tessellation shaders.
Even though both tessellation shader stages must be used together, I still think it makes sense to add separate debug flags for each stage. It makes it possible to read the TCS/HS, rule out problems, then read the TES/DS separately, without sifting through as much printed text. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--src/mesa/drivers/dri/i965/intel_debug.c6
-rw-r--r--src/mesa/drivers/dri/i965/intel_debug.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
index c00d2e786f..b15531b1ad 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.c
+++ b/src/mesa/drivers/dri/i965/intel_debug.c
@@ -75,6 +75,8 @@ static const struct debug_control debug_control[] = {
{ "cs", DEBUG_CS },
{ "hex", DEBUG_HEX },
{ "nocompact", DEBUG_NO_COMPACTION },
+ { "hs", DEBUG_HS },
+ { "ds", DEBUG_DS },
{ NULL, 0 }
};
@@ -83,8 +85,8 @@ intel_debug_flag_for_shader_stage(gl_shader_stage stage)
{
uint64_t flags[] = {
[MESA_SHADER_VERTEX] = DEBUG_VS,
- [MESA_SHADER_TESS_CTRL] = 0,
- [MESA_SHADER_TESS_EVAL] = 0,
+ [MESA_SHADER_TESS_CTRL] = DEBUG_HS,
+ [MESA_SHADER_TESS_EVAL] = DEBUG_DS,
[MESA_SHADER_GEOMETRY] = DEBUG_GS,
[MESA_SHADER_FRAGMENT] = DEBUG_WM,
[MESA_SHADER_COMPUTE] = DEBUG_CS,
diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
index 98bd7e9395..da4ad5a372 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.h
+++ b/src/mesa/drivers/dri/i965/intel_debug.h
@@ -69,6 +69,8 @@ extern uint64_t INTEL_DEBUG;
#define DEBUG_CS (1ull << 33)
#define DEBUG_HEX (1ull << 34)
#define DEBUG_NO_COMPACTION (1ull << 35)
+#define DEBUG_HS (1ull << 36)
+#define DEBUG_DS (1ull << 37)
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "INTEL-MESA"