summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layers/threading.cpp21
-rw-r--r--scripts/threading_generator.py1
2 files changed, 22 insertions, 0 deletions
diff --git a/layers/threading.cpp b/layers/threading.cpp
index 0c46ef03..5984c4c8 100644
--- a/layers/threading.cpp
+++ b/layers/threading.cpp
@@ -171,6 +171,27 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall
layer_data_map.erase(key);
}
+VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount,
+ VkImage *pSwapchainImages) {
+ dispatch_key key = get_dispatch_key(device);
+ layer_data *my_data = GetLayerDataPtr(key, layer_data_map);
+ VkLayerDispatchTable *pTable = my_data->device_dispatch_table;
+ VkResult result;
+ bool threadChecks = startMultiThread();
+ if (threadChecks) {
+ startReadObject(my_data, device);
+ startReadObject(my_data, swapchain);
+ }
+ result = pTable->GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages);
+ if (threadChecks) {
+ finishReadObject(my_data, device);
+ finishReadObject(my_data, swapchain);
+ } else {
+ finishMultiThread();
+ }
+ return result;
+}
+
static const VkExtensionProperties threading_extensions[] = {
{VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}};
diff --git a/scripts/threading_generator.py b/scripts/threading_generator.py
index fc9174bf..97d7df00 100644
--- a/scripts/threading_generator.py
+++ b/scripts/threading_generator.py
@@ -383,6 +383,7 @@ class ThreadOutputGenerator(OutputGenerator):
'vkCreateDebugReportCallbackEXT',
'vkDestroyDebugReportCallbackEXT',
'vkAllocateDescriptorSets',
+ 'vkGetSwapchainImagesKHR',
]
if name in special_functions:
decls = self.makeCDecls(cmdinfo.elem)