Bläddra i källkod

Fix memory corruption when generating Vulkan image subresources

BearishSun 8 år sedan
förälder
incheckning
24609a949e
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      Source/BansheeVulkanRenderAPI/Source/BsVulkanCommandBuffer.cpp

+ 1 - 1
Source/BansheeVulkanRenderAPI/Source/BsVulkanCommandBuffer.cpp

@@ -1722,7 +1722,7 @@ namespace bs { namespace ct
 							for(UINT32 j = 0; j < numCutRanges; j++)
 							{
 								// Create a copy of the original subresource with the new range
-								ImageSubresourceInfo newInfo = subresource;
+								ImageSubresourceInfo newInfo = mSubresourceInfos[subresourceIdx];
 								newInfo.range = tempCutRanges[j];
 
 								if(VulkanUtility::rangeOverlaps(tempCutRanges[j], range))