summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-10-13 13:51:33 -0400
committerRob Clark <[email protected]>2018-10-17 12:44:49 -0400
commit3313d693af28ee099aae8ac6e34ad007e007de84 (patch)
tree348e865a93eda62c738aeb5fe55748957fed09a7 /src/gallium
parentb23fc4cacb7ab59805751da3aefec9d958dfdd8d (diff)
freedreno/a6xx: split VBO state into binning/draw variants
Blob seems to manage to use same input registers for BS (binning pass) vs VS (draw pass) shaders, so it can use the same VBO state for both. We can't quite do that yet, so split them. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_draw.c7
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_emit.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
index a8701b44f3d..518168e51bc 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
@@ -127,7 +127,11 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring,
struct fd_ringbuffer *state;
state = fd6_build_vbo_state(emit, emit->vs);
- fd6_emit_add_group(emit, state, FD6_GROUP_VBO, 0x7);
+ 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);
}
@@ -233,6 +237,7 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
fd6_ctx->prog = fd6_emit_get_prog(&emit);
}
+ emit.bs = fd6_emit_get_prog(&emit)->bs;
emit.vs = fd6_emit_get_prog(&emit)->vs;
emit.fs = fd6_emit_get_prog(&emit)->fs;
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
index 83d0ede82ff..7a308352aac 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_ZSA,
FD6_GROUP_ZSA_BINNING,
FD6_GROUP_VBO,
+ FD6_GROUP_VBO_BINNING,
FD6_GROUP_VS_CONST,
FD6_GROUP_FS_CONST,
FD6_GROUP_VS_TEX,
@@ -82,6 +83,7 @@ struct fd6_emit {
/* cached to avoid repeated lookups: */
const struct fd6_program_state *prog;
+ struct ir3_shader_variant *bs;
struct ir3_shader_variant *vs;
struct ir3_shader_variant *fs;