Don't try to clear block/YUV textures for vulkan initial states

This commit is contained in:
baldurk
2020-02-11 11:48:38 +00:00
parent e154470fe9
commit 1a088db6ff
+7 -4
View File
@@ -1641,10 +1641,10 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live, const VkInitialConten
{
initReq = state->MaxInitReq(range, policy, initialized);
}
if(initReq == eInitReq_Copy)
// you can't clear YUV textures, so force them to be copied either way
if(initReq == eInitReq_Copy || initReq == eInitReq_Clear)
copyRegions.push_back(region);
else if(initReq == eInitReq_Clear)
clearRegions.push_back(range);
}
}
else if(IsDepthAndStencilFormat(fmt))
@@ -1706,7 +1706,10 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live, const VkInitialConten
{
initReq = state->MaxInitReq(range, policy, initialized);
}
if(initReq == eInitReq_Copy)
// you can't clear compressed textures, so fall back to copying them
if(initReq == eInitReq_Copy ||
(IsBlockFormat(imageInfo.format) && initReq == eInitReq_Clear))
copyRegions.push_back(region);
else if(initReq == eInitReq_Clear)
clearRegions.push_back(range);