mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Handle geometryShader feature being unavailable - disable lit mesh mode
This commit is contained in:
@@ -322,9 +322,12 @@ MeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(VkPipelineLay
|
||||
stages[2].stage = VK_SHADER_STAGE_GEOMETRY_BIT;
|
||||
pipeInfo.stageCount = 3;
|
||||
|
||||
vkr = vt->CreateGraphicsPipelines(Unwrap(m_Device), VK_NULL_HANDLE, 1, &pipeInfo, NULL,
|
||||
&cache.pipes[MeshDisplayPipelines::ePipe_Lit]);
|
||||
RDCASSERTEQUAL(vkr, VK_SUCCESS);
|
||||
if(stages[2].module != VK_NULL_HANDLE)
|
||||
{
|
||||
vkr = vt->CreateGraphicsPipelines(Unwrap(m_Device), VK_NULL_HANDLE, 1, &pipeInfo, NULL,
|
||||
&cache.pipes[MeshDisplayPipelines::ePipe_Lit]);
|
||||
RDCASSERTEQUAL(vkr, VK_SUCCESS);
|
||||
}
|
||||
|
||||
for(uint32_t i = 0; i < MeshDisplayPipelines::ePipe_Count; i++)
|
||||
if(cache.pipes[i] != VK_NULL_HANDLE)
|
||||
@@ -553,6 +556,10 @@ void VulkanReplay::RenderMesh(uint32_t eventId, const vector<MeshFormat> &second
|
||||
case SolidShade::Secondary: pipe = cache.pipes[MeshDisplayPipelines::ePipe_Secondary]; break;
|
||||
}
|
||||
|
||||
// can't support lit rendering without the pipeline - maybe geometry shader wasn't supported.
|
||||
if(solidShadeMode == SolidShade::Lit && pipe == VK_NULL_HANDLE)
|
||||
pipe = cache.pipes[MeshDisplayPipelines::ePipe_SolidDepth];
|
||||
|
||||
uint32_t uboOffs = 0;
|
||||
MeshUBOData *data = (MeshUBOData *)m_MeshRender.UBO.Map(&uboOffs);
|
||||
|
||||
|
||||
@@ -147,6 +147,9 @@ VulkanShaderCache::VulkanShaderCache(WrappedVulkan *driver)
|
||||
}
|
||||
}
|
||||
|
||||
if(config.stage == SPIRVShaderStage::Geometry && !features.geometryShader)
|
||||
continue;
|
||||
|
||||
std::string defines = "";
|
||||
if(driverVersion.TexelFetchBrokenDriver())
|
||||
defines += "#define NO_TEXEL_FETCH\n";
|
||||
|
||||
@@ -1082,6 +1082,13 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
|
||||
// we have a fallback for this case, so no warning
|
||||
|
||||
if(availFeatures.geometryShader)
|
||||
enabledFeatures.geometryShader = true;
|
||||
else
|
||||
RDCWARN(
|
||||
"geometryShader = false, lit mesh rendering will not be available if rendering on this "
|
||||
"device.");
|
||||
|
||||
if(availFeatures.robustBufferAccess)
|
||||
enabledFeatures.robustBufferAccess = true;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user