mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 18:30:09 +01:00
freedreno/a6xx: Remove excess CS flushing
Also requires fixing where we emit barriers, and flushing pending barriers at the end of the batch. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20975>
This commit is contained in:
parent
9b22bdc956
commit
e29001d0e7
4 changed files with 10 additions and 8 deletions
|
|
@ -64,7 +64,7 @@ event_write(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
fd6_emit_flushes(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
unsigned flushes)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ enum fd6_flush {
|
|||
FD6_WAIT_FOR_ME = BIT(8),
|
||||
};
|
||||
|
||||
void fd6_emit_flushes(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
unsigned flushes);
|
||||
|
||||
void fd6_barrier_flush(struct fd_batch *batch) assert_dt;
|
||||
|
||||
void fd6_barrier_init(struct pipe_context *pctx);
|
||||
|
|
|
|||
|
|
@ -118,6 +118,9 @@ fd6_launch_grid(struct fd_context *ctx, const struct pipe_grid_info *info) in_dt
|
|||
if (!v)
|
||||
return;
|
||||
|
||||
if (ctx->batch->barrier)
|
||||
fd6_barrier_flush(ctx->batch);
|
||||
|
||||
if (ctx->dirty_shader[PIPE_SHADER_COMPUTE] & FD_DIRTY_SHADER_PROG)
|
||||
cs_program_emit(ctx, ring, v);
|
||||
|
||||
|
|
@ -204,9 +207,6 @@ fd6_launch_grid(struct fd_context *ctx, const struct pipe_grid_info *info) in_dt
|
|||
OUT_RING(ring, 1); /* HLSQ_CS_KERNEL_GROUP_Y */
|
||||
OUT_RING(ring, 1); /* HLSQ_CS_KERNEL_GROUP_Z */
|
||||
|
||||
if (ctx->batch->barrier)
|
||||
fd6_barrier_flush(ctx->batch);
|
||||
|
||||
if (info->indirect) {
|
||||
struct fd_resource *rsc = fd_resource(info->indirect);
|
||||
|
||||
|
|
@ -227,10 +227,6 @@ fd6_launch_grid(struct fd_context *ctx, const struct pipe_grid_info *info) in_dt
|
|||
|
||||
trace_end_compute(&ctx->batch->trace, ring);
|
||||
|
||||
OUT_WFI5(ring);
|
||||
|
||||
fd6_cache_flush(ctx->batch, ring);
|
||||
|
||||
fd_context_all_clean(ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "freedreno_state.h"
|
||||
#include "freedreno_tracepoints.h"
|
||||
|
||||
#include "fd6_barrier.h"
|
||||
#include "fd6_blitter.h"
|
||||
#include "fd6_context.h"
|
||||
#include "fd6_draw.h"
|
||||
|
|
@ -609,6 +610,8 @@ emit_common_fini(struct fd_batch *batch)
|
|||
struct fd_autotune *at = &batch->ctx->autotune;
|
||||
struct fd_batch_result *result = batch->autotune_result;
|
||||
|
||||
fd6_emit_flushes(batch->ctx, ring, batch->barrier);
|
||||
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue