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 <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2019-02-05 12:52:50 +00:00 committed by Commit Bot service account
parent 8c88e1ddce
commit a27bdb4a5e
1 changed files with 1 additions and 2 deletions

View File

@ -80,8 +80,7 @@ namespace dawn_native { namespace vulkan {
// All things equal favor the memory in the biggest heap // All things equal favor the memory in the biggest heap
VkDeviceSize bestTypeHeapSize = VkDeviceSize bestTypeHeapSize =
info.memoryHeaps[info.memoryTypes[bestType].heapIndex].size; info.memoryHeaps[info.memoryTypes[bestType].heapIndex].size;
VkDeviceSize candidateHeapSize = VkDeviceSize candidateHeapSize = info.memoryHeaps[info.memoryTypes[i].heapIndex].size;
info.memoryHeaps[info.memoryTypes[bestType].heapIndex].size;
if (candidateHeapSize > bestTypeHeapSize) { if (candidateHeapSize > bestTypeHeapSize) {
bestType = static_cast<int>(i); bestType = static_cast<int>(i);
continue; continue;