mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
freedreno/a6xx: Allocate ringbuffer based on VFD count
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5064>
This commit is contained in:
parent
3275b8082a
commit
5f494636fa
1 changed files with 7 additions and 7 deletions
|
|
@ -556,9 +556,6 @@ build_vbo_state(struct fd6_emit *emit, const struct ir3_shader_variant *vp)
|
|||
{
|
||||
const struct fd_vertex_state *vtx = emit->vtx;
|
||||
|
||||
struct fd_ringbuffer *ring = fd_submit_new_ringbuffer(emit->ctx->batch->submit,
|
||||
4 * (10 * vp->inputs_count + 2), FD_RINGBUFFER_STREAMING);
|
||||
|
||||
/* Determine which inputs need VFD state */
|
||||
int32_t map[32];
|
||||
int32_t cnt = 0;
|
||||
|
|
@ -570,6 +567,13 @@ build_vbo_state(struct fd6_emit *emit, const struct ir3_shader_variant *vp)
|
|||
}
|
||||
}
|
||||
|
||||
struct fd_ringbuffer *ring = fd_submit_new_ringbuffer(emit->ctx->batch->submit,
|
||||
4 * (2 + cnt * 10), FD_RINGBUFFER_STREAMING);
|
||||
|
||||
OUT_PKT4(ring, REG_A6XX_VFD_CONTROL_0, 1);
|
||||
OUT_RING(ring, A6XX_VFD_CONTROL_0_FETCH_CNT(cnt) |
|
||||
A6XX_VFD_CONTROL_0_DECODE_CNT(cnt));
|
||||
|
||||
for (int32_t j = 0; j < cnt; j++) {
|
||||
int32_t i = map[j];
|
||||
struct pipe_vertex_element *elem = &vtx->vtx->pipe[i];
|
||||
|
|
@ -609,10 +613,6 @@ build_vbo_state(struct fd6_emit *emit, const struct ir3_shader_variant *vp)
|
|||
A6XX_VFD_DEST_CNTL_INSTR_REGID(vp->inputs[i].regid));
|
||||
}
|
||||
|
||||
OUT_PKT4(ring, REG_A6XX_VFD_CONTROL_0, 1);
|
||||
OUT_RING(ring, A6XX_VFD_CONTROL_0_FETCH_CNT(cnt) |
|
||||
A6XX_VFD_CONTROL_0_DECODE_CNT(cnt));
|
||||
|
||||
return ring;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue