mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 23:46:41 +00:00
Don't create illegal combinations of graphics pipelines for mesh renders
This commit is contained in:
@@ -475,6 +475,7 @@ private:
|
||||
bool m_MeshQueries = false;
|
||||
bool m_MeshShaders = false;
|
||||
bool m_TaskShaders = false;
|
||||
bool m_ListRestart = false;
|
||||
|
||||
PFN_vkSetDeviceLoaderData m_SetDeviceLoaderData;
|
||||
|
||||
@@ -1272,6 +1273,7 @@ public:
|
||||
bool MeshQueries() const { return m_MeshQueries; }
|
||||
bool TaskShaders() const { return m_TaskShaders; }
|
||||
bool MeshShaders() const { return m_MeshShaders; }
|
||||
bool ListRestart() const { return m_ListRestart; }
|
||||
VulkanRenderState &GetRenderState() { return m_RenderState; }
|
||||
void SetActionCB(VulkanActionCallback *cb) { m_ActionCallback = cb; }
|
||||
void SetSubmitChain(void *submitChain) { m_SubmitChain = submitChain; }
|
||||
|
||||
@@ -220,6 +220,10 @@ VKMeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(VkPipelineL
|
||||
|
||||
ia.primitiveRestartEnable = primary.allowRestart;
|
||||
|
||||
if((primary.topology == Topology::LineList || primary.topology == Topology::TriangleList) &&
|
||||
!m_pDriver->ListRestart())
|
||||
ia.primitiveRestartEnable = false;
|
||||
|
||||
VkRect2D scissor = {{0, 0}, {16384, 16384}};
|
||||
|
||||
VkPipelineViewportStateCreateInfo vp = {
|
||||
@@ -432,7 +436,8 @@ VKMeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(VkPipelineL
|
||||
stages[2].stage = VK_SHADER_STAGE_GEOMETRY_BIT;
|
||||
pipeInfo.stageCount = 3;
|
||||
|
||||
if(stages[2].module != VK_NULL_HANDLE && ia.topology != VK_PRIMITIVE_TOPOLOGY_POINT_LIST)
|
||||
if(stages[2].module != VK_NULL_HANDLE && ia.topology != VK_PRIMITIVE_TOPOLOGY_POINT_LIST &&
|
||||
ia.topology != VK_PRIMITIVE_TOPOLOGY_LINE_LIST)
|
||||
{
|
||||
vkr = vt->CreateGraphicsPipelines(Unwrap(m_Device), VK_NULL_HANDLE, 1, &pipeInfo, NULL,
|
||||
&cache.pipes[VKMeshDisplayPipelines::ePipe_Lit]);
|
||||
|
||||
@@ -2603,6 +2603,8 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
{
|
||||
CHECK_PHYS_EXT_FEATURE(primitiveTopologyListRestart);
|
||||
CHECK_PHYS_EXT_FEATURE(primitiveTopologyPatchListRestart);
|
||||
|
||||
m_ListRestart = ext->primitiveTopologyListRestart;
|
||||
}
|
||||
END_PHYS_EXT_CHECK();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user