freedreno/a6xx: Emit streamout state on every draw
If stream-output is active, we can't skip it's state-emit, even if the SO buffer(s) have not changed. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
This commit is contained in:
parent
03cf083dba
commit
fd4a742cc3
|
@ -224,6 +224,10 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
|||
if (emit.vs->need_driver_params || fd6_ctx->has_dp_state)
|
||||
emit.dirty_groups |= BIT(FD6_GROUP_VS_DRIVER_PARAMS);
|
||||
|
||||
/* If we are doing xfb, we need to emit the xfb state on every draw: */
|
||||
if (emit.prog->stream_output)
|
||||
emit.dirty_groups |= BIT(FD6_GROUP_SO);
|
||||
|
||||
if (unlikely(ctx->stats_users > 0)) {
|
||||
ctx->stats.vs_regs += ir3_shader_halfregs(emit.vs);
|
||||
ctx->stats.hs_regs += COND(emit.hs, ir3_shader_halfregs(emit.hs));
|
||||
|
|
|
@ -890,12 +890,12 @@ fd6_emit_streamout(struct fd_ringbuffer *ring, struct fd6_emit *emit)
|
|||
{
|
||||
struct fd_context *ctx = emit->ctx;
|
||||
const struct fd6_program_state *prog = fd6_emit_get_prog(emit);
|
||||
struct ir3_stream_output_info *info = &fd6_last_shader(prog)->shader->stream_output;
|
||||
struct ir3_stream_output_info *info = prog->stream_output;;
|
||||
struct fd_streamout_stateobj *so = &ctx->streamout;
|
||||
|
||||
emit->streamout_mask = 0;
|
||||
|
||||
if (!info->num_outputs)
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < so->num_targets; i++) {
|
||||
|
|
|
@ -1094,6 +1094,11 @@ fd6_program_create(void *data, struct ir3_shader_variant *bs,
|
|||
setup_stateobj(state->stateobj, ctx, state, key, false);
|
||||
state->interp_stateobj = create_interp_stateobj(ctx, state);
|
||||
|
||||
struct ir3_stream_output_info *stream_output =
|
||||
&fd6_last_shader(state)->shader->stream_output;
|
||||
if (stream_output->num_outputs > 0)
|
||||
state->stream_output = stream_output;
|
||||
|
||||
return &state->base;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ struct fd6_program_state {
|
|||
struct fd_ringbuffer *streamout_stateobj;
|
||||
struct fd_ringbuffer *stateobj;
|
||||
|
||||
struct ir3_stream_output_info *stream_output;
|
||||
|
||||
/**
|
||||
* Output components from frag shader. It is possible to have
|
||||
* a fragment shader that only writes a subset of the bound
|
||||
|
|
Loading…
Reference in New Issue