Fall back to solid pipeline if lit mesh render pipeline is not available

* This is possible for point list topologies
This commit is contained in:
baldurk
2019-07-02 10:41:17 +01:00
parent 731b701107
commit 2a0ddea474
2 changed files with 13 additions and 3 deletions
+6 -1
View File
@@ -411,7 +411,12 @@ void D3D12Replay::RenderMesh(uint32_t eventId, const std::vector<MeshFormat> &se
{
default:
case SolidShade::Solid: pipe = cache.pipes[MeshDisplayPipelines::ePipe_SolidDepth]; break;
case SolidShade::Lit: pipe = cache.pipes[MeshDisplayPipelines::ePipe_Lit]; break;
case SolidShade::Lit:
pipe = cache.pipes[MeshDisplayPipelines::ePipe_Lit];
// point list topologies don't have lighting obvious, just render them as solid
if(!pipe)
pipe = cache.pipes[MeshDisplayPipelines::ePipe_SolidDepth];
break;
case SolidShade::Secondary: pipe = cache.pipes[MeshDisplayPipelines::ePipe_Secondary]; break;
}
+7 -2
View File
@@ -340,7 +340,7 @@ MeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(VkPipelineLay
stages[2].stage = VK_SHADER_STAGE_GEOMETRY_BIT;
pipeInfo.stageCount = 3;
if(stages[2].module != VK_NULL_HANDLE)
if(stages[2].module != VK_NULL_HANDLE && ia.topology != VK_PRIMITIVE_TOPOLOGY_POINT_LIST)
{
vkr = vt->CreateGraphicsPipelines(Unwrap(m_Device), VK_NULL_HANDLE, 1, &pipeInfo, NULL,
&cache.pipes[MeshDisplayPipelines::ePipe_Lit]);
@@ -585,7 +585,12 @@ void VulkanReplay::RenderMesh(uint32_t eventId, const std::vector<MeshFormat> &s
{
default:
case SolidShade::Solid: pipe = cache.pipes[MeshDisplayPipelines::ePipe_SolidDepth]; break;
case SolidShade::Lit: pipe = cache.pipes[MeshDisplayPipelines::ePipe_Lit]; break;
case SolidShade::Lit:
pipe = cache.pipes[MeshDisplayPipelines::ePipe_Lit];
// point list topologies don't have lighting obvious, just render them as solid
if(!pipe)
pipe = cache.pipes[MeshDisplayPipelines::ePipe_SolidDepth];
break;
case SolidShade::Secondary: pipe = cache.pipes[MeshDisplayPipelines::ePipe_Secondary]; break;
}