v3dv: implement vkEndCommandBuffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
e6e80d3f9b
commit
6e4471c14c
|
@ -804,5 +804,21 @@ v3dv_CmdEndRenderPass(VkCommandBuffer commandBuffer)
|
||||||
VkResult
|
VkResult
|
||||||
v3dv_EndCommandBuffer(VkCommandBuffer commandBuffer)
|
v3dv_EndCommandBuffer(VkCommandBuffer commandBuffer)
|
||||||
{
|
{
|
||||||
|
V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||||
|
|
||||||
|
if (v3dv_cl_offset(&cmd_buffer->bcl) == 0)
|
||||||
|
return VK_SUCCESS; /* FIXME? */
|
||||||
|
|
||||||
|
v3dv_cl_ensure_space_with_branch(&cmd_buffer->bcl, cl_packet_length(FLUSH));
|
||||||
|
|
||||||
|
/* We just FLUSH here to tell the HW to cap the bin CLs with a
|
||||||
|
* return. Any remaining state changes won't be flushed to
|
||||||
|
* the bins first -- you would need FLUSH_ALL for that, but
|
||||||
|
* the HW for it hasn't been validated.
|
||||||
|
*/
|
||||||
|
cl_emit(&cmd_buffer->bcl, FLUSH, flush);
|
||||||
|
|
||||||
|
cmd_buffer->status = V3DV_CMD_BUFFER_STATUS_EXECUTABLE;
|
||||||
|
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,7 +355,8 @@ struct v3dv_cmd_pool {
|
||||||
enum v3dv_cmd_buffer_status {
|
enum v3dv_cmd_buffer_status {
|
||||||
V3DV_CMD_BUFFER_STATUS_NEW = 0,
|
V3DV_CMD_BUFFER_STATUS_NEW = 0,
|
||||||
V3DV_CMD_BUFFER_STATUS_INITIALIZED = 1,
|
V3DV_CMD_BUFFER_STATUS_INITIALIZED = 1,
|
||||||
V3DV_CMD_BUFFER_STATUS_RECORDING = 2
|
V3DV_CMD_BUFFER_STATUS_RECORDING = 2,
|
||||||
|
V3DV_CMD_BUFFER_STATUS_EXECUTABLE = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
union v3dv_clear_value {
|
union v3dv_clear_value {
|
||||||
|
|
Loading…
Reference in New Issue