v3dv: initial stub for CmdBindPipeline
Right now it only sets the pipeline to the command buffer state. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
committed by
Marge Bot
parent
60145629a2
commit
fca4dcee9f
@@ -884,3 +884,30 @@ v3dv_EndCommandBuffer(VkCommandBuffer commandBuffer)
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
v3dv_CmdBindPipeline(VkCommandBuffer commandBuffer,
|
||||
VkPipelineBindPoint pipelineBindPoint,
|
||||
VkPipeline _pipeline)
|
||||
{
|
||||
V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
V3DV_FROM_HANDLE(v3dv_pipeline, pipeline, _pipeline);
|
||||
|
||||
switch (pipelineBindPoint) {
|
||||
case VK_PIPELINE_BIND_POINT_COMPUTE:
|
||||
assert(!"VK_PIPELINE_BIND_POINT_COMPUTE not supported yet");
|
||||
break;
|
||||
|
||||
case VK_PIPELINE_BIND_POINT_GRAPHICS:
|
||||
if (cmd_buffer->state.pipeline == pipeline)
|
||||
return;
|
||||
|
||||
cmd_buffer->state.pipeline = pipeline;
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(!"invalid bind point");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,6 +389,8 @@ struct v3dv_cmd_buffer_state {
|
||||
/* Subpass state */
|
||||
uint32_t subpass_idx;
|
||||
struct v3dv_cmd_buffer_attachment_state attachments[6]; /* 4 color + D + S */
|
||||
|
||||
struct v3dv_pipeline *pipeline;
|
||||
};
|
||||
|
||||
struct v3dv_cmd_buffer {
|
||||
|
||||
Reference in New Issue
Block a user