anv/push constants: Use constant buffer #2
SKL has a workaround which requires either some weird programming of buffer 3, OR, just never using buffer 0. Since we don't actually use multiple constant buffers, it's easier to just not use 0. Only SKL requires this workaround, but there is no harm in applying it to all platforms. The big change here is that buffer #0 is relative to dynamic state base normally (depending upon ISTPM), where buffer 1-3 is a GPU virtual address.
This commit is contained in:
parent
5d4f3298ae
commit
2af3281fee
|
@ -58,8 +58,8 @@ cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer)
|
|||
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
||||
._3DCommandSubOpcode = push_constant_opcodes[stage],
|
||||
.ConstantBody = {
|
||||
.PointerToConstantBuffer0 = { .offset = state.offset },
|
||||
.ConstantBuffer0ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
||||
.PointerToConstantBuffer2 = { &cmd_buffer->device->dynamic_state_block_pool.bo, state.offset },
|
||||
.ConstantBuffer2ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
||||
});
|
||||
|
||||
flushed |= mesa_to_vk_shader_stage(stage);
|
||||
|
|
Loading…
Reference in New Issue