From 95187083c4d83377555a0f85918fbbd2fdf94f6a Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 16 Jan 2020 15:14:19 -0800 Subject: freedreno/a6xx: add PROG_FB_RAST stateobj For the handful of registers that depend on the union of program/ framebuffer/rasterizer state. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Tested-by: Marge Bot Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 5 +++++ src/gallium/drivers/freedreno/a6xx/fd6_emit.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index d6535ea580c..7b1b88cee7e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -1030,6 +1030,9 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit) } if (dirty & (FD_DIRTY_FRAMEBUFFER | FD_DIRTY_RASTERIZER | FD_DIRTY_PROG)) { + struct fd_ringbuffer *ring = fd_submit_new_ringbuffer( + emit->ctx->batch->submit, 5 * 4, FD_RINGBUFFER_STREAMING); + unsigned nr = pfb->nr_cbufs; if (ctx->rasterizer->rasterizer_discard) @@ -1043,6 +1046,8 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit) OUT_PKT4(ring, REG_A6XX_SP_FS_OUTPUT_CNTL1, 1); OUT_RING(ring, A6XX_SP_FS_OUTPUT_CNTL1_MRT(nr)); + + fd6_emit_take_group(emit, ring, FD6_GROUP_PROG_FB_RAST, ENABLE_DRAW); } fd6_emit_consts(emit, vs, PIPE_SHADER_VERTEX, FD6_GROUP_VS_CONST, ENABLE_ALL); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h index 5d03761c7ac..04674c7c833 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h @@ -47,6 +47,7 @@ enum fd6_state_id { FD6_GROUP_PROG, FD6_GROUP_PROG_BINNING, FD6_GROUP_PROG_INTERP, + FD6_GROUP_PROG_FB_RAST, FD6_GROUP_LRZ, FD6_GROUP_LRZ_BINNING, FD6_GROUP_VBO, -- cgit v1.2.3