diff options
author | Rob Clark <[email protected]> | 2018-10-26 13:48:38 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-10-26 18:10:00 -0400 |
commit | 2a74d9ae8d1906913d15e45c7abeec20efc87e6d (patch) | |
tree | 43bdf74ef613cf7c55c0b013a036679aa0732a79 /src/gallium/drivers | |
parent | ddb7fadaf8b1aa3004e72d6b0e28e465f8f45fba (diff) |
freedreno/a6xx: move where we handle dirty vbo state
Historically this wasn't in fdN_emit_state(), because prior to addition
of blitter in a5xx, fdN_emit_state() was also used in the clear path.
These days that is only true for a2xx (a3xx and a4xx use u_blitter). So
the reason for it not to be in fd6_emit_state() no longer exists.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 16 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_emit.h | 2 |
3 files changed, 14 insertions, 16 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index 9ccb03990f7..f38b8012cc3 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -123,18 +123,6 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring, const struct pipe_draw_info *info = emit->info; enum pc_di_primtype primtype = ctx->primtypes[info->mode]; - if (emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE)) { - struct fd_ringbuffer *state; - - state = fd6_build_vbo_state(emit, emit->vs); - fd6_emit_add_group(emit, state, FD6_GROUP_VBO, 0x6); - fd_ringbuffer_del(state); - - state = fd6_build_vbo_state(emit, emit->bs); - fd6_emit_add_group(emit, state, FD6_GROUP_VBO_BINNING, 0x1); - fd_ringbuffer_del(state); - } - fd6_emit_state(ring, emit); OUT_PKT4(ring, REG_A6XX_VFD_INDEX_OFFSET, 2); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index 1c7f549ee4b..ebec740c52e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -526,8 +526,8 @@ emit_ssbos(struct fd_context *ctx, struct fd_ringbuffer *ring, } } -struct fd_ringbuffer * -fd6_build_vbo_state(struct fd6_emit *emit, const struct ir3_shader_variant *vp) +static struct fd_ringbuffer * +build_vbo_state(struct fd6_emit *emit, const struct ir3_shader_variant *vp) { const struct fd_vertex_state *vtx = emit->vtx; int32_t i, j; @@ -626,6 +626,18 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit) emit_marker6(ring, 5); + if (emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE)) { + struct fd_ringbuffer *state; + + state = build_vbo_state(emit, emit->vs); + fd6_emit_add_group(emit, state, FD6_GROUP_VBO, 0x6); + fd_ringbuffer_del(state); + + state = build_vbo_state(emit, emit->bs); + fd6_emit_add_group(emit, state, FD6_GROUP_VBO_BINNING, 0x1); + fd_ringbuffer_del(state); + } + if (dirty & FD_DIRTY_ZSA) { struct fd6_zsa_stateobj *zsa = fd6_zsa_stateobj(ctx->zsa); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h index a86ef0200f5..9b55909641e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h @@ -174,8 +174,6 @@ bool fd6_emit_textures(struct fd_pipe *pipe, struct fd_ringbuffer *ring, enum a6xx_state_block sb, struct fd_texture_stateobj *tex, unsigned bcolor_offset); -struct fd_ringbuffer * fd6_build_vbo_state(struct fd6_emit *emit, const struct ir3_shader_variant *vp); - void fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit); void fd6_emit_cs_state(struct fd_context *ctx, struct fd_ringbuffer *ring, |