vb.AddressModifyEnable = true;
vb.BufferPitch = buffer->stride;
if (res) {
- vb.BufferSize = res->bo->size;
+ vb.BufferSize = res->bo->size - (int) buffer->buffer_offset;
vb.BufferStartingAddress =
ro_bo(NULL, res->bo->gtt_offset + (int) buffer->buffer_offset);
vb.MOCS = mocs(res->bo);
iris_emit_cmd(batch, GENX(3DSTATE_INDEX_BUFFER), ib) {
ib.IndexFormat = draw->index_size >> 1;
ib.MOCS = mocs(bo);
- ib.BufferSize = bo->size;
+ ib.BufferSize = bo->size - offset;
ib.BufferStartingAddress = ro_bo(bo, offset);
}