mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 15:06:32 +00:00
Upconvert initial layouts to GENERAL when promoting loadOp to LOAD
* We were doing this in vkCreateRenderPass but not vkCreateRenderPass2
This commit is contained in:
@@ -1028,20 +1028,16 @@ bool WrappedVulkan::Serialise_vkCreateRenderPass(SerialiserType &ser, VkDevice d
|
||||
if(m_ReplayOptions.optimisation != ReplayOptimisationLevel::Fastest)
|
||||
{
|
||||
if(att[i].loadOp == VK_ATTACHMENT_LOAD_OP_DONT_CARE)
|
||||
{
|
||||
att[i].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
}
|
||||
if(att[i].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_DONT_CARE)
|
||||
att[i].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
|
||||
if(att[i].loadOp == VK_ATTACHMENT_LOAD_OP_LOAD &&
|
||||
att[i].initialLayout == VK_IMAGE_LAYOUT_UNDEFINED)
|
||||
{
|
||||
att[i].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
}
|
||||
if(att[i].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_DONT_CARE)
|
||||
{
|
||||
att[i].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
if(att[i].initialLayout == VK_IMAGE_LAYOUT_UNDEFINED)
|
||||
att[i].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
}
|
||||
|
||||
if(att[i].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_LOAD &&
|
||||
att[i].initialLayout == VK_IMAGE_LAYOUT_UNDEFINED)
|
||||
{
|
||||
@@ -1292,6 +1288,26 @@ bool WrappedVulkan::Serialise_vkCreateRenderPass2(SerialiserType &ser, VkDevice
|
||||
att[i].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
}
|
||||
|
||||
if(m_ReplayOptions.optimisation != ReplayOptimisationLevel::Fastest)
|
||||
{
|
||||
if(att[i].loadOp == VK_ATTACHMENT_LOAD_OP_DONT_CARE)
|
||||
att[i].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
if(att[i].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_DONT_CARE)
|
||||
att[i].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
|
||||
if(att[i].loadOp == VK_ATTACHMENT_LOAD_OP_LOAD &&
|
||||
att[i].initialLayout == VK_IMAGE_LAYOUT_UNDEFINED)
|
||||
{
|
||||
att[i].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
}
|
||||
|
||||
if(att[i].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_LOAD &&
|
||||
att[i].initialLayout == VK_IMAGE_LAYOUT_UNDEFINED)
|
||||
{
|
||||
att[i].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
}
|
||||
}
|
||||
|
||||
// renderpass can't start or end in presentable layout on replay
|
||||
SanitiseOldImageLayout(att[i].initialLayout);
|
||||
SanitiseNewImageLayout(att[i].finalLayout);
|
||||
|
||||
Reference in New Issue
Block a user