aboutsummaryrefslogtreecommitdiff
path: root/layers/object_tracker_utils.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-07-21 13:23:13 -0600
committerMark Lobodzinski <mark@lunarg.com>2017-07-24 10:21:38 -0600
commit6d1155878d2461881f25caba4c5c2540ad18ad24 (patch)
tree24218f2a622fc278f0911c2eb36c9f4d32f7506c /layers/object_tracker_utils.cpp
parent9391244210c941ecf167feb1e6f3c5e8a890b260 (diff)
downloadusermoji-6d1155878d2461881f25caba4c5c2540ad18ad24.tar.xz
layers: Move GetSwaphchainImages func in OT
Special case function must avoid code generation. Change-Id: I7c03cb2c0b4053f3d2b0579d532f1da82be80bd4
Diffstat (limited to 'layers/object_tracker_utils.cpp')
-rw-r--r--layers/object_tracker_utils.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/layers/object_tracker_utils.cpp b/layers/object_tracker_utils.cpp
index f7ac60f6..125ed55d 100644
--- a/layers/object_tracker_utils.cpp
+++ b/layers/object_tracker_utils.cpp
@@ -614,6 +614,27 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con
return result;
}
+VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount,
+ VkImage *pSwapchainImages) {
+ bool skip = VK_FALSE;
+ std::unique_lock<std::mutex> lock(global_lock);
+ skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_30805601, VALIDATION_ERROR_UNDEFINED);
+ lock.unlock();
+ if (skip) {
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ VkResult result = get_dispatch_table(ot_device_table_map, device)
+ ->GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages);
+ if (pSwapchainImages != NULL) {
+ lock.lock();
+ for (uint32_t i = 0; i < *pSwapchainImageCount; i++) {
+ CreateSwapchainImageObject(device, pSwapchainImages[i], swapchain);
+ }
+ lock.unlock();
+ }
+ return result;
+}
+
VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice,
uint32_t *pQueueFamilyPropertyCount,
VkQueueFamilyProperties *pQueueFamilyProperties) {