summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-08-19 11:53:25 +0200
committerMarek Olšák <[email protected]>2015-08-26 19:25:19 +0200
commit2c14a6d3b1c53d5814414ce9e91fd8d24c90b787 (patch)
tree86e88808c7bed71d6a1716fbaaf46dec6d7539e1 /src/gallium/drivers/radeonsi/si_pipe.h
parent189953ee13ad7d6b5d9d04ac21a230e8137a700d (diff)
radeonsi: add IB tracing support for debug contexts
This adds trace points to all IBs and the parser prints them and also prints which trace points were reached (executed) by the CP. This can help pinpoint a problematic packet, draw call, etc. Acked-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 09a21ceb618..52167f24a95 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -43,7 +43,7 @@
#define SI_RESTART_INDEX_UNKNOWN INT_MIN
#define SI_NUM_SMOOTH_AA_SAMPLES 8
-#define SI_TRACE_CS_DWORDS 6
+#define SI_TRACE_CS_DWORDS 7
#define SI_MAX_DRAW_CS_DWORDS \
(/*scratch:*/ 3 + /*derived prim state:*/ 3 + \
@@ -81,6 +81,10 @@
SI_CONTEXT_FLUSH_AND_INV_DB | \
SI_CONTEXT_FLUSH_AND_INV_DB_META)
+#define SI_ENCODE_TRACE_POINT(id) (0xcafe0000 | ((id) & 0xffff))
+#define SI_IS_TRACE_POINT(x) (((x) & 0xcafe0000) == 0xcafe0000)
+#define SI_GET_TRACE_POINT_ID(x) ((x) & 0xffff)
+
struct si_compute;
struct si_screen {
@@ -247,6 +251,9 @@ struct si_context {
bool is_debug;
uint32_t *last_ib;
unsigned last_ib_dw_size;
+ struct r600_resource *last_trace_buf;
+ struct r600_resource *trace_buf;
+ unsigned trace_id;
};
/* cik_sdma.c */