anv: Use an anv_address in anv_buffer

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
This commit is contained in:
Jason Ekstrand
2018-05-30 18:05:54 -07:00
parent 8a8bd39d5e
commit f270a09737
9 changed files with 34 additions and 61 deletions

View File

@@ -566,8 +566,7 @@ void genX(CmdBindIndexBuffer)(
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_INDEX_BUFFER), ib) {
ib.IndexFormat = vk_to_gen_index_type[indexType];
ib.MemoryObjectControlState = GENX(MOCS);
ib.BufferStartingAddress =
(struct anv_address) { buffer->bo, buffer->offset + offset };
ib.BufferStartingAddress = anv_address_add(buffer->address, offset);
ib.BufferSize = buffer->size - offset;
}