Don't use existance of renderpass to determine graphics vs compute pipe

* When using dynamic rendering there is no renderpass object even for graphics
  pipelines
This commit is contained in:
baldurk
2022-01-21 10:34:40 +00:00
parent 62bbbbdcf7
commit e0b4a2771f
3 changed files with 8 additions and 1 deletions
+4
View File
@@ -356,6 +356,8 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan,
{
flags = pCreateInfo->flags;
graphicsPipe = true;
layout = GetResID(pCreateInfo->layout);
renderpass = GetResID(pCreateInfo->renderPass);
subpass = pCreateInfo->subpass;
@@ -741,6 +743,8 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan, Vulk
{
flags = pCreateInfo->flags;
graphicsPipe = false;
layout = GetResID(pCreateInfo->layout);
// need to figure out which states are valid to be NULL
+2
View File
@@ -252,6 +252,8 @@ struct VulkanCreationInfo
void Init(VulkanResourceManager *resourceMan, VulkanCreationInfo &info, ResourceId id,
const VkComputePipelineCreateInfo *pCreateInfo);
bool graphicsPipe = false;
ResourceId layout;
ResourceId renderpass;
uint32_t subpass;
+2 -1
View File
@@ -4253,7 +4253,8 @@ void VulkanReplay::RefreshDerivedReplacements()
{
VkPipeline pipe = VK_NULL_HANDLE;
if(pipeInfo.renderpass != ResourceId()) // check if this is a graphics or compute pipeline
// check if this is a graphics or compute pipeline
if(pipeInfo.graphicsPipe)
{
VkGraphicsPipelineCreateInfo pipeCreateInfo;
m_pDriver->GetShaderCache()->MakeGraphicsPipelineInfo(pipeCreateInfo, it->first);