mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
vc4: Add support for ARB_draw_elements_base_vertex.
Gallium exposes it unconditionally, so do our best to support it. It fails on the negative index cases, but those seem unlikely to be used in the wild.
This commit is contained in:
parent
98a4b111fb
commit
7850774f21
1 changed files with 3 additions and 1 deletions
|
|
@ -201,7 +201,9 @@ vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
|
|||
struct pipe_vertex_buffer *vb =
|
||||
&vertexbuf->vb[elem->vertex_buffer_index];
|
||||
struct vc4_resource *rsc = vc4_resource(vb->buffer);
|
||||
uint32_t offset = vb->buffer_offset + elem->src_offset;
|
||||
uint32_t offset = (vb->buffer_offset +
|
||||
elem->src_offset +
|
||||
vb->stride * info->index_bias);
|
||||
uint32_t vb_size = rsc->bo->size - offset;
|
||||
uint32_t elem_size =
|
||||
util_format_get_blocksize(elem->src_format);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue