mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-09 01:00:35 +02:00
nvc0: add the index buffer offset where missing
This commit is contained in:
parent
5138ac033a
commit
99f9a9727c
3 changed files with 4 additions and 1 deletions
|
|
@ -227,6 +227,8 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
|
|||
PIPE_TRANSFER_READ, &transfer);
|
||||
if (!ctx.idxbuf)
|
||||
return;
|
||||
ctx.idxbuf = (uint8_t *)ctx.idxbuf + nvc0->idxbuf.offset;
|
||||
|
||||
index_size = nvc0->idxbuf.index_size;
|
||||
ctx.primitive_restart = info->primitive_restart;
|
||||
ctx.restart_index = info->restart_index;
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ nvc0_push_vbo2(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
|
|||
struct nvc0_resource *res = nvc0_resource(nvc0->idxbuf.buffer);
|
||||
if (!res || nouveau_bo_map(res->bo, NOUVEAU_BO_RD))
|
||||
return;
|
||||
ctx.idxbuf = res->bo->map;
|
||||
ctx.idxbuf = (uint8_t *)res->bo->map + nvc0->idxbuf.offset + res->offset;
|
||||
nouveau_bo_unmap(res->bo);
|
||||
ctx.idxsize = nvc0->idxbuf.index_size;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -459,6 +459,7 @@ nvc0_draw_elements(struct nvc0_context *nvc0, boolean shorten,
|
|||
PIPE_TRANSFER_READ, &transfer);
|
||||
if (!data)
|
||||
return;
|
||||
data = (uint8_t *)data + nvc0->idxbuf.offset;
|
||||
|
||||
while (instance_count--) {
|
||||
BEGIN_RING(chan, RING_3D(VERTEX_BEGIN_GL), 1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue