anv/cmd_buffer: Re-emit push constants packets for all stages
This commit is contained in:
@@ -52,20 +52,20 @@ 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) {
|
||||||
continue;
|
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
||||||
|
._3DCommandSubOpcode = push_constant_opcodes[stage]);
|
||||||
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
} else {
|
||||||
._3DCommandSubOpcode = push_constant_opcodes[stage],
|
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
||||||
.ConstantBody = {
|
._3DCommandSubOpcode = push_constant_opcodes[stage],
|
||||||
.PointerToConstantBuffer0 = { .offset = state.offset },
|
.ConstantBody = {
|
||||||
.ConstantBuffer0ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
.PointerToConstantBuffer0 = { .offset = state.offset },
|
||||||
});
|
.ConstantBuffer0ReadLength = DIV_ROUND_UP(state.alloc_size, 32),
|
||||||
|
});
|
||||||
flushed |= mesa_to_vk_shader_stage(stage);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_buffer->state.push_constants_dirty &= ~flushed;
|
cmd_buffer->state.push_constants_dirty &= ~VK_SHADER_STAGE_ALL_GRAPHICS;
|
||||||
|
|
||||||
return flushed;
|
return flushed;
|
||||||
}
|
}
|
||||||
|
@@ -52,20 +52,20 @@ 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) {
|
||||||
continue;
|
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
||||||
|
._3DCommandSubOpcode = push_constant_opcodes[stage]);
|
||||||
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
} else {
|
||||||
._3DCommandSubOpcode = push_constant_opcodes[stage],
|
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
|
||||||
.ConstantBody = {
|
._3DCommandSubOpcode = push_constant_opcodes[stage],
|
||||||
.PointerToConstantBuffer2 = { &cmd_buffer->device->dynamic_state_block_pool.bo, state.offset },
|
.ConstantBody = {
|
||||||
.ConstantBuffer2ReadLength = 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);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_buffer->state.push_constants_dirty &= ~flushed;
|
cmd_buffer->state.push_constants_dirty &= ~VK_SHADER_STAGE_ALL_GRAPHICS;
|
||||||
|
|
||||||
return flushed;
|
return flushed;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user