diff options
author | Rob Clark <[email protected]> | 2020-01-16 10:42:39 -0800 |
---|---|---|
committer | Rob Clark <[email protected]> | 2020-01-17 15:43:51 -0800 |
commit | fba7e6f89600e1b2f41af5a42d91427be5468892 (patch) | |
tree | 0360a815db21533a297b1f2b8a7a6bda77ebcb65 /src/gallium/drivers/freedreno | |
parent | 5d7381c645903657e25d1c678d5733a64b4b99ec (diff) |
freedreno/a6xx: limit scratch/debug markers to debug builds
The overhead does seem to matter when you have a high enough # of draw
calls that effect few bins/pixels, because these writes would happen
unconditionally (ie. not part of a state-group).
Possibly we could keep these if we moved them into a state-group so the
register writes would be no-ops on bins with no geometry. OTOH I
usually end up adding in a WFI when using them scratch reg values to
track down a crash. (So add a WFI to mitigate the annoyance of needing
to use a debug build to get scratch regs to locate the position of a
crash/hang in the cmdstream.)
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_context.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.h b/src/gallium/drivers/freedreno/a6xx/fd6_context.h index 0d810d350e9..a7f786fac61 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_context.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.h @@ -143,8 +143,16 @@ emit_marker6(struct fd_ringbuffer *ring, int scratch_idx) { extern unsigned marker_cnt; unsigned reg = REG_A6XX_CP_SCRATCH_REG(scratch_idx); - OUT_PKT4(ring, reg, 1); - OUT_RING(ring, ++marker_cnt); +#ifdef DEBUG +# define __EMIT_MARKER 1 +#else +# define __EMIT_MARKER 0 +#endif + if (__EMIT_MARKER) { + OUT_WFI5(ring); + OUT_PKT4(ring, reg, 1); + OUT_RING(ring, ++marker_cnt); + } } #endif /* FD6_CONTEXT_H_ */ |