瀏覽代碼

Fix memory corruption when generating Vulkan image subresources

BearishSun 8 年之前
父節點
當前提交
24609a949e
共有 1 個文件被更改,包括 1 次插入1 次删除
  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++)
 							for(UINT32 j = 0; j < numCutRanges; j++)
 							{
 							{
 								// Create a copy of the original subresource with the new range
 								// Create a copy of the original subresource with the new range
-								ImageSubresourceInfo newInfo = subresource;
+								ImageSubresourceInfo newInfo = mSubresourceInfos[subresourceIdx];
 								newInfo.range = tempCutRanges[j];
 								newInfo.range = tempCutRanges[j];
 
 
 								if(VulkanUtility::rangeOverlaps(tempCutRanges[j], range))
 								if(VulkanUtility::rangeOverlaps(tempCutRanges[j], range))