mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-14 09:18:20 +02:00
freedreno: OUT_RELOC vs OUT_RELOCW fixes
Make sure we use OUT_RELOCW() in cases where the buffer is written to. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
f68c6951b8
commit
01b071d530
3 changed files with 7 additions and 7 deletions
|
|
@ -1014,8 +1014,8 @@ fd3_emit_tile_renderprep(struct fd_context *ctx, struct fd_tile *tile)
|
|||
|
||||
|
||||
OUT_PKT3(ring, CP_SET_BIN_DATA, 2);
|
||||
OUT_RELOC(ring, pipe->bo, 0, 0, 0); /* BIN_DATA_ADDR <- VSC_PIPE[p].DATA_ADDRESS */
|
||||
OUT_RELOC(ring, fd3_ctx->vsc_size_mem, /* BIN_SIZE_ADDR <- VSC_SIZE_ADDRESS + (p * 4) */
|
||||
OUT_RELOCW(ring, pipe->bo, 0, 0, 0); /* BIN_DATA_ADDR <- VSC_PIPE[p].DATA_ADDRESS */
|
||||
OUT_RELOCW(ring, fd3_ctx->vsc_size_mem, /* BIN_SIZE_ADDR <- VSC_SIZE_ADDRESS + (p * 4) */
|
||||
(tile->p * 4), 0, 0);
|
||||
} else {
|
||||
OUT_PKT0(ring, REG_A3XX_PC_VSTREAM_CONTROL, 1);
|
||||
|
|
|
|||
|
|
@ -773,8 +773,8 @@ fd4_emit_tile_renderprep(struct fd_context *ctx, struct fd_tile *tile)
|
|||
A4XX_PC_VSTREAM_CONTROL_N(tile->n));
|
||||
|
||||
OUT_PKT3(ring, CP_SET_BIN_DATA, 2);
|
||||
OUT_RELOC(ring, pipe->bo, 0, 0, 0); /* BIN_DATA_ADDR <- VSC_PIPE[p].DATA_ADDRESS */
|
||||
OUT_RELOC(ring, fd4_ctx->vsc_size_mem, /* BIN_SIZE_ADDR <- VSC_SIZE_ADDRESS + (p * 4) */
|
||||
OUT_RELOCW(ring, pipe->bo, 0, 0, 0); /* BIN_DATA_ADDR <- VSC_PIPE[p].DATA_ADDRESS */
|
||||
OUT_RELOCW(ring, fd4_ctx->vsc_size_mem, /* BIN_SIZE_ADDR <- VSC_SIZE_ADDRESS + (p * 4) */
|
||||
(tile->p * 4), 0, 0);
|
||||
} else {
|
||||
OUT_PKT0(ring, REG_A4XX_PC_VSTREAM_CONTROL, 1);
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ time_elapsed_get_sample(struct fd_context *ctx, struct fd_ringbuffer *ring)
|
|||
OUT_RING(ring, CP_REG_TO_MEM_0_REG(REG_A4XX_RBBM_PERFCTR_CP_0_LO) |
|
||||
CP_REG_TO_MEM_0_64B |
|
||||
CP_REG_TO_MEM_0_CNT(2-1)); /* write 2 regs to mem */
|
||||
OUT_RELOC(ring, scratch_bo, sample_off, 0, 0);
|
||||
OUT_RELOCW(ring, scratch_bo, sample_off, 0, 0);
|
||||
|
||||
/* ok... here we really *would* like to use the CP_SET_CONSTANT
|
||||
* mode which can add a constant to value in reg2 and write to
|
||||
|
|
@ -187,7 +187,7 @@ time_elapsed_get_sample(struct fd_context *ctx, struct fd_ringbuffer *ring)
|
|||
|
||||
/* per-sample offset to scratch bo: */
|
||||
OUT_PKT3(ring, CP_MEM_WRITE, 2);
|
||||
OUT_RELOC(ring, scratch_bo, addr_off, 0, 0);
|
||||
OUT_RELOCW(ring, scratch_bo, addr_off, 0, 0);
|
||||
OUT_RING(ring, samp->offset);
|
||||
|
||||
/* now add to that the per-tile base: */
|
||||
|
|
@ -195,7 +195,7 @@ time_elapsed_get_sample(struct fd_context *ctx, struct fd_ringbuffer *ring)
|
|||
OUT_RING(ring, CP_REG_TO_MEM_0_REG(HW_QUERY_BASE_REG) |
|
||||
CP_REG_TO_MEM_0_ACCUMULATE |
|
||||
CP_REG_TO_MEM_0_CNT(1-1)); /* readback 1 regs */
|
||||
OUT_RELOC(ring, scratch_bo, addr_off, 0, 0);
|
||||
OUT_RELOCW(ring, scratch_bo, addr_off, 0, 0);
|
||||
|
||||
/* now copy that back to CP_ME_NRT_ADDR: */
|
||||
OUT_PKT3(ring, CP_MEM_TO_REG, 2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue