Merge pull request #5292 from ReinUsesLisp/empty-set
vk_rasterizer: Skip binding empty descriptor sets on compute
This commit is contained in:
commit
2a6e6306d8
|
@ -628,8 +628,10 @@ void RasterizerVulkan::DispatchCompute(GPUVAddr code_addr) {
|
||||||
grid_z = launch_desc.grid_dim_z, pipeline_handle, pipeline_layout,
|
grid_z = launch_desc.grid_dim_z, pipeline_handle, pipeline_layout,
|
||||||
descriptor_set](vk::CommandBuffer cmdbuf) {
|
descriptor_set](vk::CommandBuffer cmdbuf) {
|
||||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_handle);
|
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_handle);
|
||||||
cmdbuf.BindDescriptorSets(VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_layout, DESCRIPTOR_SET,
|
if (descriptor_set) {
|
||||||
descriptor_set, {});
|
cmdbuf.BindDescriptorSets(VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_layout,
|
||||||
|
DESCRIPTOR_SET, descriptor_set, nullptr);
|
||||||
|
}
|
||||||
cmdbuf.Dispatch(grid_x, grid_y, grid_z);
|
cmdbuf.Dispatch(grid_x, grid_y, grid_z);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue