Correctly handle D3D12 resources with no sparse subresources at all

This commit is contained in:
baldurk
2022-11-01 16:33:18 +00:00
parent 52b5a8954e
commit 32dbbaa707
+5 -1
View File
@@ -1285,7 +1285,11 @@ void D3D12ResourceManager::Apply_InitialState(ID3D12DeviceChild *live,
}
const uint32_t *nextIncludedSubresource = data.subresources.begin();
if(data.subresources.empty() || *nextIncludedSubresource == ~0U)
// if no subresources were serialised, just skip!
if(data.subresources.empty())
numSubresources = 0;
// if ALL subresources were serialised, serialise them all
else if(*nextIncludedSubresource == ~0U)
nextIncludedSubresource = NULL;
UINT64 offset = 0;