mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-07 14:25:44 +00:00
Vulkan PostVS ignore primmitive restart indexes when restart is active
Compute primitive restart using VulkanRenderState not pipeline, to account for dynamic state. Ignore primitive restart indexes, handles primitive restart indexes being used when there are no active vertex buffer bindings
This commit is contained in:
@@ -1749,7 +1749,7 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
|
||||
|
||||
if(action->flags & ActionFlags::Indexed)
|
||||
{
|
||||
const bool restart = pipeCreateInfo.pInputAssemblyState->primitiveRestartEnable == VK_TRUE;
|
||||
const bool restart = state.primRestartEnable != VK_FALSE;
|
||||
bytebuf idxdata;
|
||||
rdcarray<uint32_t> indices;
|
||||
uint8_t *idx8 = NULL;
|
||||
@@ -1838,6 +1838,10 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
|
||||
// buffers which is generally much more reasonable
|
||||
i32 = RDCMIN(maxIdx, i32);
|
||||
|
||||
// ignore primitive restart indices
|
||||
if(restart && i32 == (0xffffffff >> ((4 - idxsize) * 8)))
|
||||
continue;
|
||||
|
||||
auto it = std::lower_bound(indices.begin(), indices.end(), i32);
|
||||
|
||||
if(it != indices.end() && *it == i32)
|
||||
|
||||
Reference in New Issue
Block a user