Skip to content

v3dv: properly handle two different binding points for cmd_buffers

From vkCmdBindPipeline spec:

"pipelineBindPoint is a VkPipelineBindPoint value specifying to which bind point the pipeline is bound. Binding one does not disturb the others."

But internally we were only handling one pipeline per command buffer, so binding a pipeline of one type would override an alredy bound pipeline of other type.

Note that for push constants, in the same way that we were keeping one client array and one bo for the values, for all stages, independently of the stageFlags specified by vkCmdPushConstants, we are keeping the same idea here, so such client array and bo is still tied to the command buffer, and used by the two pipeline bind points. That makes far easier tracking the push constants. We could revisit in the future if we want a more fine grained tracking.

As we are here we also remove the struct v3dv_resource, as in the end it has exactly the same definition that v3dv_cl_reloc.

Fixes the following crashes: dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_diff_range_bind_push_vert_and_comp dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_same_range_bind_push_vert_and_comp

Merge request reports