mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-27 15:20:37 +02:00
asahi: fix prim restart unrolling with indirects
need to account for draw->start. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
parent
c0d3bf3608
commit
5261962186
2 changed files with 4 additions and 2 deletions
|
|
@ -210,6 +210,7 @@ setup_unroll_for_draw(global struct agx_ia_state *ia, constant uint *in_draw,
|
|||
\
|
||||
uint count = in_draw[0]; \
|
||||
constant INDEX *in = (constant INDEX *)ia->index_buffer; \
|
||||
in += in_draw[2]; \
|
||||
\
|
||||
global INDEX *out = \
|
||||
setup_unroll_for_draw(ia, in_draw, draw, mode, sizeof(INDEX)); \
|
||||
|
|
|
|||
|
|
@ -4075,7 +4075,8 @@ agx_draw_without_restart(struct agx_batch *batch,
|
|||
agx_batch_init_state(batch);
|
||||
|
||||
size_t ib_extent = 0;
|
||||
uint64_t ib = agx_index_buffer_ptr(batch, info, draw, &ib_extent);
|
||||
uint64_t ib =
|
||||
agx_index_buffer_ptr(batch, info, indirect ? NULL : draw, &ib_extent);
|
||||
|
||||
/* The rest of this function handles only the general case of indirect
|
||||
* multidraws, so synthesize an indexed indirect draw now if we need one for
|
||||
|
|
@ -4084,7 +4085,7 @@ agx_draw_without_restart(struct agx_batch *batch,
|
|||
struct pipe_draw_indirect_info indirect_synthesized = {.draw_count = 1};
|
||||
|
||||
if (!indirect) {
|
||||
uint32_t desc[5] = {draw->count, info->instance_count, draw->start,
|
||||
uint32_t desc[5] = {draw->count, info->instance_count, 0,
|
||||
draw->index_bias, info->start_instance};
|
||||
|
||||
u_upload_data(ctx->base.const_uploader, 0, sizeof(desc), 4, &desc,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue