summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-06-04 15:15:40 -0700
committerKristian H. Kristensen <[email protected]>2019-06-05 11:15:04 -0700
commit1e6c873f1f386f8b5869fede48ad125a199ce3a5 (patch)
tree1326ac52d02666e1a919bc4031814b394c033ee5 /src
parent3da9a24f35a80e4aa7df85530127d7a813daa5ea (diff)
freedreno/ir3: Extend debug helpers to support TCS/TES/GS
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3_compiler.c3
-rw-r--r--src/freedreno/ir3/ir3_compiler.h20
-rw-r--r--src/freedreno/ir3/ir3_shader.h3
3 files changed, 19 insertions, 7 deletions
diff --git a/src/freedreno/ir3/ir3_compiler.c b/src/freedreno/ir3/ir3_compiler.c
index be9ae83b278..fc81246c5ab 100644
--- a/src/freedreno/ir3/ir3_compiler.c
+++ b/src/freedreno/ir3/ir3_compiler.c
@@ -30,6 +30,9 @@
static const struct debug_named_value shader_debug_options[] = {
{"vs", IR3_DBG_SHADER_VS, "Print shader disasm for vertex shaders"},
+ {"tcs", IR3_DBG_SHADER_TCS, "Print shader disasm for tess ctrl shaders"},
+ {"tes", IR3_DBG_SHADER_TES, "Print shader disasm for tess eval shaders"},
+ {"gs", IR3_DBG_SHADER_GS, "Print shader disasm for geometry shaders"},
{"fs", IR3_DBG_SHADER_FS, "Print shader disasm for fragment shaders"},
{"cs", IR3_DBG_SHADER_CS, "Print shader disasm for compute shaders"},
{"disasm", IR3_DBG_DISASM, "Dump NIR and adreno shader disassembly"},
diff --git a/src/freedreno/ir3/ir3_compiler.h b/src/freedreno/ir3/ir3_compiler.h
index e46bdc2cb59..e621b3689af 100644
--- a/src/freedreno/ir3/ir3_compiler.h
+++ b/src/freedreno/ir3/ir3_compiler.h
@@ -82,13 +82,16 @@ unsigned ir3_pointer_size(struct ir3_compiler *compiler)
}
enum ir3_shader_debug {
- IR3_DBG_SHADER_VS = 0x01,
- IR3_DBG_SHADER_FS = 0x02,
- IR3_DBG_SHADER_CS = 0x04,
- IR3_DBG_DISASM = 0x08,
- IR3_DBG_OPTMSGS = 0x10,
- IR3_DBG_FORCES2EN = 0x20,
- IR3_DBG_NOUBOOPT = 0x40,
+ IR3_DBG_SHADER_VS = 0x001,
+ IR3_DBG_SHADER_TCS = 0x002,
+ IR3_DBG_SHADER_TES = 0x004,
+ IR3_DBG_SHADER_GS = 0x008,
+ IR3_DBG_SHADER_FS = 0x010,
+ IR3_DBG_SHADER_CS = 0x020,
+ IR3_DBG_DISASM = 0x040,
+ IR3_DBG_OPTMSGS = 0x080,
+ IR3_DBG_FORCES2EN = 0x100,
+ IR3_DBG_NOUBOOPT = 0x200,
};
extern enum ir3_shader_debug ir3_shader_debug;
@@ -98,6 +101,9 @@ shader_debug_enabled(gl_shader_stage type)
{
switch (type) {
case MESA_SHADER_VERTEX: return !!(ir3_shader_debug & IR3_DBG_SHADER_VS);
+ case MESA_SHADER_TESS_CTRL: return !!(ir3_shader_debug & IR3_DBG_SHADER_TCS);
+ case MESA_SHADER_TESS_EVAL: return !!(ir3_shader_debug & IR3_DBG_SHADER_TES);
+ case MESA_SHADER_GEOMETRY: return !!(ir3_shader_debug & IR3_DBG_SHADER_GS);
case MESA_SHADER_FRAGMENT: return !!(ir3_shader_debug & IR3_DBG_SHADER_FS);
case MESA_SHADER_COMPUTE: return !!(ir3_shader_debug & IR3_DBG_SHADER_CS);
default:
diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h
index 01e079140f1..61654b75f8f 100644
--- a/src/freedreno/ir3/ir3_shader.h
+++ b/src/freedreno/ir3/ir3_shader.h
@@ -567,6 +567,9 @@ ir3_shader_stage(struct ir3_shader *shader)
{
switch (shader->type) {
case MESA_SHADER_VERTEX: return "VERT";
+ case MESA_SHADER_TESS_CTRL: return "TCS";
+ case MESA_SHADER_TESS_EVAL: return "TES";
+ case MESA_SHADER_GEOMETRY: return "GEOM";
case MESA_SHADER_FRAGMENT: return "FRAG";
case MESA_SHADER_COMPUTE: return "CL";
default: