From 882d53d8e36592a39cde947e890969a81b2b1226 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 2 Aug 2019 14:07:47 -0700 Subject: freedreno/ir3+a6xx: same VBO state for draw/binning Worth ~+20% on gl_driver2 Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 5 +---- src/gallium/drivers/freedreno/a6xx/fd6_emit.h | 1 - src/gallium/drivers/freedreno/a6xx/fd6_program.c | 8 ++++++++ 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index ef584177d16..59e0a9780e0 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -791,10 +791,7 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit) struct fd_ringbuffer *state; state = build_vbo_state(emit, emit->vs); - fd6_emit_take_group(emit, state, FD6_GROUP_VBO, 0x6); - - state = build_vbo_state(emit, emit->bs); - fd6_emit_take_group(emit, state, FD6_GROUP_VBO_BINNING, 0x1); + fd6_emit_take_group(emit, state, FD6_GROUP_VBO, 0x7); } if (dirty & FD_DIRTY_ZSA) { diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h index 2ffb76c3900..bc66884fb5a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h @@ -49,7 +49,6 @@ enum fd6_state_id { FD6_GROUP_LRZ, FD6_GROUP_LRZ_BINNING, FD6_GROUP_VBO, - FD6_GROUP_VBO_BINNING, FD6_GROUP_VS_CONST, FD6_GROUP_FS_CONST, FD6_GROUP_VS_TEX, diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index 3aa91c312b3..a2acaa7b5c2 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -703,6 +703,14 @@ fd6_program_create(void *data, struct ir3_shader_variant *bs, state->binning_stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000); state->stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000); +#ifdef DEBUG + for (unsigned i = 0; i < bs->inputs_count; i++) { + if (vs->inputs[i].sysval) + continue; + debug_assert(bs->inputs[i].regid == vs->inputs[i].regid); + } +#endif + setup_config_stateobj(state->config_stateobj, state); setup_stateobj(state->binning_stateobj, ctx->screen, state, key, true); setup_stateobj(state->stateobj, ctx->screen, state, key, false); -- cgit v1.2.3