anv/cmd_buffer: Use the new emit macro for 3DSTATE_CONSTANT
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
This commit is contained in:
@@ -295,12 +295,12 @@ cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer)
|
|||||||
struct anv_state state = anv_cmd_buffer_push_constants(cmd_buffer, stage);
|
struct anv_state state = anv_cmd_buffer_push_constants(cmd_buffer, stage);
|
||||||
|
|
||||||
if (state.offset == 0) {
|
if (state.offset == 0) {
|
||||||
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
anv_batch_emit_blk(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS), c)
|
||||||
._3DCommandSubOpcode = push_constant_opcodes[stage]);
|
c._3DCommandSubOpcode = push_constant_opcodes[stage];
|
||||||
} else {
|
} else {
|
||||||
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
anv_batch_emit_blk(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS), c) {
|
||||||
._3DCommandSubOpcode = push_constant_opcodes[stage],
|
c._3DCommandSubOpcode = push_constant_opcodes[stage],
|
||||||
.ConstantBody = {
|
c.ConstantBody = (struct GENX(3DSTATE_CONSTANT_BODY)) {
|
||||||
#if GEN_GEN >= 9
|
#if GEN_GEN >= 9
|
||||||
.PointerToConstantBuffer2 = { &cmd_buffer->device->dynamic_state_block_pool.bo, state.offset },
|
.PointerToConstantBuffer2 = { &cmd_buffer->device->dynamic_state_block_pool.bo, state.offset },
|
||||||
.ConstantBuffer2ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
.ConstantBuffer2ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
||||||
@@ -308,7 +308,8 @@ cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer)
|
|||||||
.PointerToConstantBuffer0 = { .offset = state.offset },
|
.PointerToConstantBuffer0 = { .offset = state.offset },
|
||||||
.ConstantBuffer0ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
.ConstantBuffer0ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
||||||
#endif
|
#endif
|
||||||
});
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flushed |= mesa_to_vk_shader_stage(stage);
|
flushed |= mesa_to_vk_shader_stage(stage);
|
||||||
|
Reference in New Issue
Block a user