mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
freedreno/a6xx: Move emit_marker and wfi to draw_impl()
This way the markers clearly bracket the draw call and isn't duplicated for both direct and indirect draw code. Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
This commit is contained in:
parent
0559050557
commit
fb1c6b89a2
1 changed files with 12 additions and 17 deletions
|
|
@ -52,14 +52,6 @@ fd6_draw(struct fd_batch *batch, struct fd_ringbuffer *ring,
|
|||
uint32_t idx_size, uint32_t idx_offset,
|
||||
struct pipe_resource *idx_buffer)
|
||||
{
|
||||
/* for debug after a lock up, write a unique counter value
|
||||
* to scratch7 for each draw, to make it easier to match up
|
||||
* register dumps to cmdstream. The combination of IB
|
||||
* (scratch6) and DRAW is enough to "triangulate" the
|
||||
* particular draw that caused lockup.
|
||||
*/
|
||||
emit_marker6(ring, 7);
|
||||
|
||||
OUT_PKT7(ring, CP_DRAW_INDX_OFFSET, idx_buffer ? 7 : 3);
|
||||
if (vismode == USE_VISIBILITY) {
|
||||
/* leave vis mode blank for now, it will be patched up when
|
||||
|
|
@ -77,10 +69,6 @@ fd6_draw(struct fd_batch *batch, struct fd_ringbuffer *ring,
|
|||
OUT_RELOC(ring, fd_resource(idx_buffer)->bo, idx_offset, 0, 0);
|
||||
OUT_RING (ring, idx_size);
|
||||
}
|
||||
|
||||
emit_marker6(ring, 7);
|
||||
|
||||
fd_reset_wfi(batch);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -98,8 +86,6 @@ fd6_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring,
|
|||
if (info->indirect) {
|
||||
struct fd_resource *ind = fd_resource(info->indirect->buffer);
|
||||
|
||||
emit_marker6(ring, 7);
|
||||
|
||||
if (info->index_size) {
|
||||
struct pipe_resource *idx = info->index.resource;
|
||||
unsigned max_indicies = (idx->width0 - info->indirect->offset) /
|
||||
|
|
@ -121,9 +107,6 @@ fd6_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring,
|
|||
OUT_RELOC(ring, ind->bo, info->indirect->offset, 0, 0);
|
||||
}
|
||||
|
||||
emit_marker6(ring, 7);
|
||||
fd_reset_wfi(batch);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -169,9 +152,21 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
info->restart_index : 0xffffffff);
|
||||
|
||||
fd6_emit_render_cntl(ctx, false, emit->key.binning_pass);
|
||||
|
||||
/* for debug after a lock up, write a unique counter value
|
||||
* to scratch7 for each draw, to make it easier to match up
|
||||
* register dumps to cmdstream. The combination of IB
|
||||
* (scratch6) and DRAW is enough to "triangulate" the
|
||||
* particular draw that caused lockup.
|
||||
*/
|
||||
emit_marker6(ring, 7);
|
||||
|
||||
fd6_draw_emit(ctx->batch, ring, primtype,
|
||||
emit->key.binning_pass ? IGNORE_VISIBILITY : USE_VISIBILITY,
|
||||
info, index_offset);
|
||||
|
||||
emit_marker6(ring, 7);
|
||||
fd_reset_wfi(ctx->batch);
|
||||
}
|
||||
|
||||
/* fixup dirty shader state in case some "unrelated" (from the state-
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue