mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 21:50:34 +01:00
radeonsi: fix UNSIGNED_BYTE index buffer fallback with non-zero start (v2)
start can only be non-zero with MultiDrawElements, which is unlikely
to occur with UNSIGNED_BYTE indices.
v2: Also fix the util_shorten_ubyte_elts_to_userptr call.
Tested with the new piglit.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit a264fee624)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/gallium/drivers/radeonsi/si_state_draw.c
This commit is contained in:
parent
c1c6aa8151
commit
ea6ae74cb0
1 changed files with 2 additions and 2 deletions
|
|
@ -1026,7 +1026,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
|
|||
void *ptr;
|
||||
|
||||
si_get_draw_start_count(sctx, info, &start, &count);
|
||||
start_offset = start * ib.index_size;
|
||||
start_offset = start * 2;
|
||||
|
||||
u_upload_alloc(sctx->b.uploader, start_offset, count * 2, 256,
|
||||
&out_offset, &out_buffer, &ptr);
|
||||
|
|
@ -1036,7 +1036,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
|
|||
}
|
||||
|
||||
util_shorten_ubyte_elts_to_userptr(&sctx->b.b, &ib, 0,
|
||||
ib.offset + start_offset,
|
||||
ib.offset + start,
|
||||
count, ptr);
|
||||
|
||||
pipe_resource_reference(&ib.buffer, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue