diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2020-04-09 16:21:48 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2020-04-09 16:23:43 -0600 |
| commit | 2fd41fab58c82eaf24cc8b55a81638a655a221fa (patch) | |
| tree | 091536c46f434927f90c0ac5a22c236ff72351c6 /scripts | |
| parent | e3dd6a33ed6244c64a44dc41b11464d5945e0fcc (diff) | |
| download | usermoji-2fd41fab58c82eaf24cc8b55a81638a655a221fa.tar.xz | |
Revert "icd: Fix vkGetSwapchainImages behavior"
This reverts commit 00573263e0. This caused the
VkLayerTest.SwapchainAcquireTooManyImages2KHR test to fail,
blocking CI.
Change-Id: Id1464668e02dda50a37eb0fabb275eb897105eb4
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mock_icd_generator.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index 623b89f8..3368d07c 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -880,19 +880,13 @@ CUSTOM_C_INTERCEPTS = { *pLayout = VkSubresourceLayout(); // Default constructor zero values. ''', 'vkGetSwapchainImagesKHR': ''' - constexpr uint32_t icd_image_count = 2; - if (!pSwapchainImages) { - *pSwapchainImageCount = icd_image_count; - } else { - unique_lock_t lock(global_lock); - for (uint32_t img_i = 0; img_i < (std::min)(*pSwapchainImageCount, icd_image_count); ++img_i){ - // For simplicity always returns new handles, which is wrong - pSwapchainImages[img_i] = (VkImage)global_unique_handle++; + *pSwapchainImageCount = 1; + } else if (*pSwapchainImageCount > 0) { + pSwapchainImages[0] = (VkImage)global_unique_handle++; + if (*pSwapchainImageCount != 1) { + return VK_INCOMPLETE; } - - if (*pSwapchainImageCount < icd_image_count) return VK_INCOMPLETE; - else if (*pSwapchainImageCount > icd_image_count) *pSwapchainImageCount = icd_image_count; } return VK_SUCCESS; ''', @@ -1080,7 +1074,6 @@ class MockICDOutputGenerator(OutputGenerator): else: write('#include "mock_icd.h"', file=self.outFile) write('#include <stdlib.h>', file=self.outFile) - write('#include <algorithm>', file=self.outFile) write('#include <vector>', file=self.outFile) write('#include "vk_typemap_helper.h"', file=self.outFile) |
