From a27bdb4a5ecace852178960ba7b42650ff3b8085 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 5 Feb 2019 12:52:50 +0000 Subject: [PATCH] Vulkan: Fix finding of the largest candidate heap. BUG=dawn:98 Change-Id: Ibcae3a760b9feb2cbba47d40c3eeea9e63481682 Reviewed-on: https://dawn-review.googlesource.com/c/4340 Reviewed-by: Austin Eng Commit-Queue: Corentin Wallez --- src/dawn_native/vulkan/MemoryAllocator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dawn_native/vulkan/MemoryAllocator.cpp b/src/dawn_native/vulkan/MemoryAllocator.cpp index 3ab6c26d47..e71adcb319 100644 --- a/src/dawn_native/vulkan/MemoryAllocator.cpp +++ b/src/dawn_native/vulkan/MemoryAllocator.cpp @@ -80,8 +80,7 @@ namespace dawn_native { namespace vulkan { // All things equal favor the memory in the biggest heap VkDeviceSize bestTypeHeapSize = info.memoryHeaps[info.memoryTypes[bestType].heapIndex].size; - VkDeviceSize candidateHeapSize = - info.memoryHeaps[info.memoryTypes[bestType].heapIndex].size; + VkDeviceSize candidateHeapSize = info.memoryHeaps[info.memoryTypes[i].heapIndex].size; if (candidateHeapSize > bestTypeHeapSize) { bestType = static_cast(i); continue;