mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-14 18:46:48 +00:00
Ensure even for non-indexed mesh picks we bind dummy buffer
* The descriptor needs to be valid even if it's not used, when not using descriptor indexing rules, so ensure the IB buffer is at least some minimum size.
This commit is contained in:
@@ -1319,6 +1319,17 @@ uint32_t VulkanReplay::PickVertex(uint32_t eventId, int32_t width, int32_t heigh
|
||||
|
||||
m_VertexPick.IBUpload.Unmap();
|
||||
}
|
||||
else
|
||||
{
|
||||
// ensure IB is non-empty so we have a valid descriptor below
|
||||
if(m_VertexPick.IBSize == 0)
|
||||
{
|
||||
m_VertexPick.IBSize = 1 * sizeof(uint32_t);
|
||||
|
||||
m_VertexPick.IB.Create(m_pDriver, dev, m_VertexPick.IBSize, 1,
|
||||
GPUBuffer::eGPUBufferGPULocal | GPUBuffer::eGPUBufferSSBO);
|
||||
}
|
||||
}
|
||||
|
||||
// unpack and linearise the data
|
||||
{
|
||||
@@ -1457,10 +1468,7 @@ uint32_t VulkanReplay::PickVertex(uint32_t eventId, int32_t width, int32_t heigh
|
||||
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, NULL, &ibInfo, NULL},
|
||||
};
|
||||
|
||||
if(!idxs.empty())
|
||||
vt->UpdateDescriptorSets(Unwrap(m_Device), 2, writes, 0, NULL);
|
||||
else
|
||||
vt->UpdateDescriptorSets(Unwrap(m_Device), 1, writes, 0, NULL);
|
||||
vt->UpdateDescriptorSets(Unwrap(m_Device), 2, writes, 0, NULL);
|
||||
|
||||
VkCommandBuffer cmd = m_pDriver->GetNextCmd();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user