Don't apply quick check-and-skip for array descriptor slots

* Just because the first element in the array isn't valid doesn't mean there
  aren't elements later that are valid which we should update.
This commit is contained in:
baldurk
2018-12-20 12:13:13 +00:00
parent 7498c53a37
commit 68c5ffe5ee
+3 -2
View File
@@ -830,8 +830,9 @@ bool WrappedVulkan::Serialise_InitialState(SerialiserType &ser, ResourceId id, W
// skipping any invalid descriptors.
// quick check for slots that were completely uninitialised and so don't have valid data
if(src->texelBufferView == VK_NULL_HANDLE && src->imageInfo.sampler == VK_NULL_HANDLE &&
src->imageInfo.imageView == VK_NULL_HANDLE && src->bufferInfo.buffer == VK_NULL_HANDLE)
if(descriptorCount == 1 && src->texelBufferView == VK_NULL_HANDLE &&
src->imageInfo.sampler == VK_NULL_HANDLE && src->imageInfo.imageView == VK_NULL_HANDLE &&
src->bufferInfo.buffer == VK_NULL_HANDLE)
{
// do nothing - don't increment bind so that the same write descriptor is used next time.
continue;