From: Tobin Ehlis Date: Wed, 8 Feb 2017 14:40:40 +0000 (-0700) Subject: layers:Rename get_my_data_ptr to GetLayerDataPtr X-Git-Tag: upstream/1.1.92~1609 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a7cc86a237221cdd44bb4f51e4d88113be037d8;p=platform%2Fupstream%2FVulkan-Tools.git layers:Rename get_my_data_ptr to GetLayerDataPtr Change utility function get_my_data_ptr() to be named GetLayerDataPtr() which is more descriptive and capital camel case in-line with coding standard. --- diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 396df59..3951a8f 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3846,7 +3846,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); if (result != VK_SUCCESS) return result; - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(*pInstance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(*pInstance), instance_layer_data_map); instance_data->instance = *pInstance; layer_init_instance_dispatch_table(*pInstance, &instance_data->dispatch_table, fpGetInstanceProcAddr); instance_data->report_data = debug_report_create_instance( @@ -3865,7 +3865,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati dispatch_key key = get_dispatch_key(instance); // TBD: Need any locking this early, in case this function is called at the // same time by more than one thread? - instance_layer_data *instance_data = get_my_data_ptr(key, instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(key, instance_layer_data_map); instance_data->dispatch_table.DestroyInstance(instance, pAllocator); std::lock_guard lock(global_lock); @@ -3883,7 +3883,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati static void checkDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo, VkDevice device) { uint32_t i; // TBD: Need any locking, in case this function is called at the same time by more than one thread? - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); dev_data->device_extensions.wsi_enabled = false; dev_data->device_extensions.wsi_display_swapchain_enabled = false; dev_data->device_extensions.nv_glsl_shader_enabled = false; @@ -3978,14 +3978,14 @@ static bool ValidateRequestedFeatures(instance_layer_data *dev_data, VkPhysicalD VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { - instance_layer_data *my_instance_data = get_my_data_ptr(get_dispatch_key(gpu), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(gpu), instance_layer_data_map); bool skip_call = false; // Check that any requested features are available if (pCreateInfo->pEnabledFeatures) { - skip_call |= ValidateRequestedFeatures(my_instance_data, gpu, pCreateInfo->pEnabledFeatures); + skip_call |= ValidateRequestedFeatures(instance_data, gpu, pCreateInfo->pEnabledFeatures); } - skip_call |= ValidateRequestedQueueFamilyProperties(my_instance_data, gpu, pCreateInfo); + skip_call |= ValidateRequestedQueueFamilyProperties(instance_data, gpu, pCreateInfo); if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; @@ -3996,7 +3996,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice assert(chain_info->u.pLayerInfo); PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; - PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(my_instance_data->instance, "vkCreateDevice"); + PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(instance_data->instance, "vkCreateDevice"); if (fpCreateDevice == NULL) { return VK_ERROR_INITIALIZATION_FAILED; } @@ -4010,33 +4010,33 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice } std::unique_lock lock(global_lock); - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); - my_device_data->instance_data = my_instance_data; + device_data->instance_data = instance_data; // Setup device dispatch table - layer_init_device_dispatch_table(*pDevice, &my_device_data->dispatch_table, fpGetDeviceProcAddr); - my_device_data->device = *pDevice; + layer_init_device_dispatch_table(*pDevice, &device_data->dispatch_table, fpGetDeviceProcAddr); + device_data->device = *pDevice; // Save PhysicalDevice handle - my_device_data->physical_device = gpu; + device_data->physical_device = gpu; - my_device_data->report_data = layer_debug_report_create_device(my_instance_data->report_data, *pDevice); + device_data->report_data = layer_debug_report_create_device(instance_data->report_data, *pDevice); checkDeviceRegisterExtensions(pCreateInfo, *pDevice); // Get physical device limits for this device - my_instance_data->dispatch_table.GetPhysicalDeviceProperties(gpu, &(my_device_data->phys_dev_properties.properties)); + instance_data->dispatch_table.GetPhysicalDeviceProperties(gpu, &(device_data->phys_dev_properties.properties)); uint32_t count; - my_instance_data->dispatch_table.GetPhysicalDeviceQueueFamilyProperties(gpu, &count, nullptr); - my_device_data->phys_dev_properties.queue_family_properties.resize(count); - my_instance_data->dispatch_table.GetPhysicalDeviceQueueFamilyProperties( - gpu, &count, &my_device_data->phys_dev_properties.queue_family_properties[0]); + instance_data->dispatch_table.GetPhysicalDeviceQueueFamilyProperties(gpu, &count, nullptr); + device_data->phys_dev_properties.queue_family_properties.resize(count); + instance_data->dispatch_table.GetPhysicalDeviceQueueFamilyProperties( + gpu, &count, &device_data->phys_dev_properties.queue_family_properties[0]); // TODO: device limits should make sure these are compatible if (pCreateInfo->pEnabledFeatures) { - my_device_data->enabled_features = *pCreateInfo->pEnabledFeatures; + device_data->enabled_features = *pCreateInfo->pEnabledFeatures; } else { - memset(&my_device_data->enabled_features, 0, sizeof(VkPhysicalDeviceFeatures)); + memset(&device_data->enabled_features, 0, sizeof(VkPhysicalDeviceFeatures)); } // Store physical device properties and physical device mem limits into device layer_data structs - my_instance_data->dispatch_table.GetPhysicalDeviceMemoryProperties(gpu, &my_device_data->phys_dev_mem_props); - my_instance_data->dispatch_table.GetPhysicalDeviceProperties(gpu, &my_device_data->phys_dev_props); + instance_data->dispatch_table.GetPhysicalDeviceMemoryProperties(gpu, &device_data->phys_dev_mem_props); + instance_data->dispatch_table.GetPhysicalDeviceProperties(gpu, &device_data->phys_dev_props); lock.unlock(); ValidateLayerOrdering(*pCreateInfo); @@ -4049,7 +4049,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall // TODOSC : Shouldn't need any customization here bool skip = false; dispatch_key key = get_dispatch_key(device); - layer_data *dev_data = get_my_data_ptr(key, layer_data_map); + layer_data *dev_data = GetLayerDataPtr(key, layer_data_map); // Free all the memory std::unique_lock lock(global_lock); deletePipelines(dev_data); @@ -4507,7 +4507,7 @@ static bool ValidateFenceForSubmit(layer_data *dev_data, FENCE_NODE *pFence) { VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; std::unique_lock lock(global_lock); @@ -4640,7 +4640,7 @@ static void PostCallRecordAllocateMemory(layer_data *dev_data, const VkMemoryAll VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip = PreCallValidateAllocateMemory(dev_data); if (!skip) { @@ -4708,7 +4708,7 @@ static void PostCallRecordFreeMemory(layer_data *dev_data, VkDeviceMemory mem, D } VKAPI_ATTR void VKAPI_CALL FreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); DEVICE_MEM_INFO *mem_info = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -4894,7 +4894,7 @@ static void PostCallRecordWaitForFences(layer_data *dev_data, uint32_t fence_cou VKAPI_ATTR VkResult VKAPI_CALL WaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // Verify fence status of submitted fences std::unique_lock lock(global_lock); bool skip = PreCallValidateWaitForFences(dev_data, fenceCount, pFences); @@ -4919,7 +4919,7 @@ static bool PreCallValidateGetFenceStatus(layer_data *dev_data, VkFence fence) { static void PostCallRecordGetFenceStatus(layer_data *dev_data, VkFence fence) { RetireFence(dev_data, fence); } VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus(VkDevice device, VkFence fence) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip = PreCallValidateGetFenceStatus(dev_data, fence); lock.unlock(); @@ -4946,7 +4946,7 @@ static void PostCallRecordGetDeviceQueue(layer_data *dev_data, uint32_t q_family } VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); dev_data->dispatch_table.GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); std::lock_guard lock(global_lock); @@ -4964,7 +4964,7 @@ static void PostCallRecordQueueWaitIdle(layer_data *dev_data, QUEUE_STATE *queue } VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); QUEUE_STATE *queue_state = nullptr; std::unique_lock lock(global_lock); bool skip = PreCallValidateQueueWaitIdle(dev_data, queue, &queue_state); @@ -4995,7 +4995,7 @@ static void PostCallRecordDeviceWaitIdle(layer_data *dev_data) { } VKAPI_ATTR VkResult VKAPI_CALL DeviceWaitIdle(VkDevice device) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip = PreCallValidateDeviceWaitIdle(dev_data); lock.unlock(); @@ -5027,7 +5027,7 @@ static bool PreCallValidateDestroyFence(layer_data *dev_data, VkFence fence, FEN static void PostCallRecordDestroyFence(layer_data *dev_data, VkFence fence) { dev_data->fenceMap.erase(fence); } VKAPI_ATTR void VKAPI_CALL DestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // Common data objects used pre & post call FENCE_NODE *fence_node = nullptr; VK_OBJECT obj_struct; @@ -5057,7 +5057,7 @@ static bool PreCallValidateDestroySemaphore(layer_data *dev_data, VkSemaphore se static void PostCallRecordDestroySemaphore(layer_data *dev_data, VkSemaphore sema) { dev_data->semaphoreMap.erase(sema); } VKAPI_ATTR void VKAPI_CALL DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); SEMAPHORE_NODE *sema_node; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5087,7 +5087,7 @@ static void PostCallRecordDestroyEvent(layer_data *dev_data, VkEvent event, EVEN } VKAPI_ATTR void VKAPI_CALL DestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); EVENT_STATE *event_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5121,7 +5121,7 @@ static void PostCallRecordDestroyQueryPool(layer_data *dev_data, VkQueryPool que } VKAPI_ATTR void VKAPI_CALL DestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); QUERY_POOL_NODE *qp_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5225,7 +5225,7 @@ static void PostCallRecordGetQueryPoolResults(layer_data *dev_data, VkQueryPool VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *pData, VkDeviceSize stride, VkQueryResultFlags flags) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); unordered_map> queries_in_flight; std::unique_lock lock(global_lock); bool skip = PreCallValidateGetQueryPoolResults(dev_data, queryPool, firstQuery, queryCount, flags, &queries_in_flight); @@ -5423,7 +5423,7 @@ static void PostCallRecordDestroyBuffer(layer_data *dev_data, VkBuffer buffer, B } VKAPI_ATTR void VKAPI_CALL DestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); BUFFER_STATE *buffer_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5458,7 +5458,7 @@ static void PostCallRecordDestroyBufferView(layer_data *dev_data, VkBufferView b } VKAPI_ATTR void VKAPI_CALL DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // Common data objects used pre & post call BUFFER_VIEW_STATE *buffer_view_state = nullptr; VK_OBJECT obj_struct; @@ -5476,7 +5476,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyBufferView(VkDevice device, VkBufferView buffe } VKAPI_ATTR void VKAPI_CALL DestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); IMAGE_STATE *image_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5507,7 +5507,7 @@ static bool ValidateMemoryTypes(const layer_data *dev_data, const DEVICE_MEM_INF } VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memoryOffset) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; std::unique_lock lock(global_lock); // Track objects tied to memory @@ -5595,7 +5595,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); dev_data->dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); auto buffer_state = getBufferState(dev_data, buffer); if (buffer_state) { @@ -5605,7 +5605,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer } VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); dev_data->dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); auto image_state = getImageState(dev_data, image); if (image_state) { @@ -5634,7 +5634,7 @@ static void PostCallRecordDestroyImageView(layer_data *dev_data, VkImageView ima } VKAPI_ATTR void VKAPI_CALL DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // Common data objects used pre & post call IMAGE_VIEW_STATE *image_view_state = nullptr; VK_OBJECT obj_struct; @@ -5652,7 +5652,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyImageView(VkDevice device, VkImageView imageVi VKAPI_ATTR void VKAPI_CALL DestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); dev_data->shaderModuleMap.erase(shaderModule); @@ -5681,7 +5681,7 @@ static void PostCallRecordDestroyPipeline(layer_data *dev_data, VkPipeline pipel } VKAPI_ATTR void VKAPI_CALL DestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); PIPELINE_STATE *pipeline_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5698,7 +5698,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipeline(VkDevice device, VkPipeline pipeline, VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); dev_data->pipelineLayoutMap.erase(pipelineLayout); lock.unlock(); @@ -5726,7 +5726,7 @@ static void PostCallRecordDestroySampler(layer_data *dev_data, VkSampler sampler } VKAPI_ATTR void VKAPI_CALL DestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); SAMPLER_STATE *sampler_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5747,7 +5747,7 @@ static void PostCallRecordDestroyDescriptorSetLayout(layer_data *dev_data, VkDes VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); dev_data->dispatch_table.DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); std::unique_lock lock(global_lock); PostCallRecordDestroyDescriptorSetLayout(dev_data, descriptorSetLayout); @@ -5778,7 +5778,7 @@ static void PostCallRecordDestroyDescriptorPool(layer_data *dev_data, VkDescript VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); DESCRIPTOR_POOL_STATE *desc_pool_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -5833,7 +5833,7 @@ static void clearCommandBuffersInFlight(layer_data *dev_data, COMMAND_POOL_NODE VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; std::unique_lock lock(global_lock); @@ -5869,7 +5869,7 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool com VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); @@ -5883,7 +5883,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool(VkDevice device, const VkComman VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip = false; if (pCreateInfo && pCreateInfo->queryType == VK_QUERY_TYPE_PIPELINE_STATISTICS) { if (!dev_data->enabled_features.pipelineStatisticsQuery) { @@ -5941,7 +5941,7 @@ static void PostCallRecordDestroyCommandPool(layer_data *dev_data, VkCommandPool // Destroy commandPool along with all of the commandBuffers allocated from that pool VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); COMMAND_POOL_NODE *cp_state = nullptr; std::unique_lock lock(global_lock); bool skip = PreCallValidateDestroyCommandPool(dev_data, commandPool, &cp_state); @@ -5956,7 +5956,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool com } VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; std::unique_lock lock(global_lock); @@ -5981,7 +5981,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool(VkDevice device, VkCommandPool c } VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; std::unique_lock lock(global_lock); for (uint32_t i = 0; i < fenceCount; ++i) { @@ -6045,7 +6045,7 @@ static void PostCallRecordDestroyFramebuffer(layer_data *dev_data, VkFramebuffer } VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); FRAMEBUFFER_STATE *framebuffer_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -6079,7 +6079,7 @@ static void PostCallRecordDestroyRenderPass(layer_data *dev_data, VkRenderPass r } VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); RENDER_PASS_STATE *rp_state = nullptr; VK_OBJECT obj_struct; std::unique_lock lock(global_lock); @@ -6096,7 +6096,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass rende VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // TODO: Add check for VALIDATION_ERROR_00658 // TODO: Add check for VALIDATION_ERROR_00666 // TODO: Add check for VALIDATION_ERROR_00667 @@ -6129,7 +6129,7 @@ static bool PreCallValidateCreateBufferView(layer_data *dev_data, const VkBuffer VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView(VkDevice device, const VkBufferViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBufferView *pView) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip_call = PreCallValidateCreateBufferView(dev_data, pCreateInfo); lock.unlock(); @@ -6177,7 +6177,7 @@ std::unordered_map *GetImageLayoutMap(l VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip = PreCallValidateCreateImage(dev_data, pCreateInfo, pAllocator, pImage); if (!skip) { result = dev_data->dispatch_table.CreateImage(device, pCreateInfo, pAllocator, pImage); @@ -6340,7 +6340,7 @@ static inline void PostCallRecordCreateImageView(layer_data *dev_data, const VkI VKAPI_ATTR VkResult VKAPI_CALL CreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImageView *pView) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip = PreCallValidateCreateImageView(dev_data, pCreateInfo); lock.unlock(); @@ -6357,7 +6357,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView(VkDevice device, const VkImageVie VKAPI_ATTR VkResult VKAPI_CALL CreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.CreateFence(device, pCreateInfo, pAllocator, pFence); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); @@ -6372,27 +6372,27 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence(VkDevice device, const VkFenceCreateI // TODO handle pipeline caches VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineCache *pPipelineCache) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); return result; } VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); dev_data->dispatch_table.DestroyPipelineCache(device, pipelineCache, pAllocator); } VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t *pDataSize, void *pData) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.GetPipelineCacheData(device, pipelineCache, pDataSize, pData); return result; } VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache *pSrcCaches) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); return result; } @@ -6422,7 +6422,7 @@ static bool PreCallCreateGraphicsPipelines(layer_data *device_data, uint32_t cou const VkGraphicsPipelineCreateInfo *create_infos, vector &pipe_state) { bool skip = false; instance_layer_data *instance_data = - get_my_data_ptr(get_dispatch_key(device_data->instance_data->instance), instance_layer_data_map); + GetLayerDataPtr(get_dispatch_key(device_data->instance_data->instance), instance_layer_data_map); for (uint32_t i = 0; i < count; i++) { skip |= verifyPipelineCreateState(device_data, pipe_state, i); @@ -6457,7 +6457,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli bool skip = false; // TODO : Improve this data struct w/ unique_ptrs so cleanup below is automatic vector pipe_state(count); - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); uint32_t i = 0; std::unique_lock lock(global_lock); @@ -6501,7 +6501,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin // TODO : Improve this data struct w/ unique_ptrs so cleanup below is automatic vector pPipeState(count); - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); uint32_t i = 0; std::unique_lock lock(global_lock); @@ -6546,7 +6546,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.CreateSampler(device, pCreateInfo, pAllocator, pSampler); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); @@ -6569,7 +6569,7 @@ static void PostCallRecordCreateDescriptorSetLayout(layer_data *dev_data, const VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; std::unique_lock lock(global_lock); bool skip = PreCallValidateCreateDescriptorSetLayout(dev_data, pCreateInfo); @@ -6696,7 +6696,7 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // TODO : Add checks for VALIDATION_ERRORS 865-871 // Push Constant Range checks uint32_t i, j; @@ -6748,7 +6748,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPip VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); if (VK_SUCCESS == result) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, @@ -6774,7 +6774,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDes VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { // TODO : Add checks for VALIDATION_ERROR_00928 - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.ResetDescriptorPool(device, descriptorPool, flags); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); @@ -6802,7 +6802,7 @@ static void PostCallRecordAllocateDescriptorSets(layer_data *dev_data, const VkD VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); cvdescriptorset::AllocateDescriptorSetsData common_data(pAllocateInfo->descriptorSetCount); bool skip_call = PreCallValidateAllocateDescriptorSets(dev_data, pAllocateInfo, &common_data); @@ -6867,7 +6867,7 @@ static void PostCallRecordFreeDescriptorSets(layer_data *dev_data, VkDescriptorP VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet *pDescriptorSets) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // Make sure that no sets being destroyed are in-flight std::unique_lock lock(global_lock); bool skip_call = PreCallValidateFreeDescriptorSets(dev_data, descriptorPool, count, pDescriptorSets); @@ -6912,7 +6912,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets(VkDevice device, uint32_t descri const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies) { // Only map look-up at top level is for device-level layer_data - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip_call = PreCallValidateUpdateDescriptorSets(dev_data, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); @@ -6929,7 +6929,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets(VkDevice device, uint32_t descri VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pCreateInfo, VkCommandBuffer *pCommandBuffer) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.AllocateCommandBuffers(device, pCreateInfo, pCommandBuffer); if (VK_SUCCESS == result) { std::unique_lock lock(global_lock); @@ -6973,7 +6973,7 @@ static void AddFramebufferBinding(layer_data *dev_data, GLOBAL_CB_NODE *cb_state VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); // Validate command buffer level GLOBAL_CB_NODE *cb_node = getCBNode(dev_data, commandBuffer); @@ -7101,7 +7101,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { bool skip_call = false; VkResult result = VK_SUCCESS; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7138,7 +7138,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); VkCommandPool cmdPool = pCB->createInfo.commandPool; @@ -7166,7 +7166,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { bool skip = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *cb_state = getCBNode(dev_data, commandBuffer); if (cb_state) { @@ -7211,7 +7211,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipe VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7226,7 +7226,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7240,7 +7240,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7266,7 +7266,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7281,7 +7281,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7295,7 +7295,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, c VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7310,7 +7310,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds(VkCommandBuffer commandBuffer, floa VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7324,7 +7324,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7338,7 +7338,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7355,7 +7355,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -7526,7 +7526,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); // TODO : Somewhere need to verify that IBs have correct usage state flagged std::unique_lock lock(global_lock); @@ -7581,7 +7581,7 @@ static inline void updateResourceTrackingOnDraw(GLOBAL_CB_NODE *pCB) { pCB->draw VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); // TODO : Somewhere need to verify that VBs have correct usage state flagged std::unique_lock lock(global_lock); @@ -7674,7 +7674,7 @@ static void PostCallRecordCmdDraw(layer_data *dev_data, GLOBAL_CB_NODE *cb_state VKAPI_ATTR void VKAPI_CALL CmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *cb_state = nullptr; std::unique_lock lock(global_lock); bool skip = PreCallValidateCmdDraw(dev_data, commandBuffer, false, VK_PIPELINE_BIND_POINT_GRAPHICS, &cb_state, "vkCmdDraw()"); @@ -7699,7 +7699,7 @@ static void PostCallRecordCmdDrawIndexed(layer_data *dev_data, GLOBAL_CB_NODE *c VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *cb_state = nullptr; std::unique_lock lock(global_lock); bool skip = PreCallValidateCmdDrawIndexed(dev_data, commandBuffer, true, VK_PIPELINE_BIND_POINT_GRAPHICS, &cb_state, @@ -7731,7 +7731,7 @@ static void PostCallRecordCmdDrawIndirect(layer_data *dev_data, GLOBAL_CB_NODE * VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *cb_state = nullptr; BUFFER_STATE *buffer_state = nullptr; std::unique_lock lock(global_lock); @@ -7764,7 +7764,7 @@ static void PostCallRecordCmdDrawIndexedIndirect(layer_data *dev_data, GLOBAL_CB VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *cb_state = nullptr; BUFFER_STATE *buffer_state = nullptr; std::unique_lock lock(global_lock); @@ -7790,7 +7790,7 @@ static void PostCallRecordCmdDispatch(layer_data *dev_data, GLOBAL_CB_NODE *cb_s } VKAPI_ATTR void VKAPI_CALL CmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *cb_state = nullptr; std::unique_lock lock(global_lock); bool skip = @@ -7821,7 +7821,7 @@ static void PostCallRecordCmdDispatchIndirect(layer_data *dev_data, GLOBAL_CB_NO } VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *cb_state = nullptr; BUFFER_STATE *buffer_state = nullptr; std::unique_lock lock(global_lock); @@ -7839,7 +7839,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect(VkCommandBuffer commandBuffer, Vk VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy *pRegions) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8078,7 +8078,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage(VkCommandBuffer commandBuffer, VkImage s VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy *pRegions) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8146,7 +8146,7 @@ bool ValidateImageSampleCount(layer_data *dev_data, IMAGE_STATE *image_state, Vk VKAPI_ATTR void VKAPI_CALL CmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8167,7 +8167,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy *pRegions) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8213,7 +8213,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8263,7 +8263,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, V VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const uint32_t *pData) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8294,7 +8294,7 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuff VKAPI_ATTR void VKAPI_CALL CmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8326,7 +8326,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui const VkClearAttachment *pAttachments, uint32_t rectCount, const VkClearRect *pRects) { bool skip = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); skip = PreCallValidateCmdClearAttachments(dev_data, commandBuffer, attachmentCount, pAttachments, rectCount, pRects); @@ -8337,7 +8337,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui VKAPI_ATTR void VKAPI_CALL CmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue *pColor, uint32_t rangeCount, const VkImageSubresourceRange *pRanges) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); bool skip = PreCallValidateCmdClearColorImage(dev_data, commandBuffer, image, imageLayout, rangeCount, pRanges); @@ -8351,7 +8351,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearColorImage(VkCommandBuffer commandBuffer, VkI VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue *pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange *pRanges) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); bool skip = PreCallValidateCmdClearDepthStencilImage(dev_data, commandBuffer, image, imageLayout, rangeCount, pRanges); @@ -8365,7 +8365,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage(VkCommandBuffer commandBuff VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve *pRegions) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -8385,7 +8385,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImag VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout) { bool skipCall = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkFormat format; auto imageEntry = getImageState(device_data, image); @@ -8421,7 +8421,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout(VkDevice device, VkImage im } bool setEventStageMask(VkQueue queue, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { pCB->eventToStageMap[event] = stageMask; @@ -8435,7 +8435,7 @@ bool setEventStageMask(VkQueue queue, VkCommandBuffer commandBuffer, VkEvent eve VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -8464,7 +8464,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent ev VKAPI_ATTR void VKAPI_CALL CmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -8497,7 +8497,7 @@ static bool ValidateBarriers(const char *funcName, VkCommandBuffer cmdBuffer, ui const VkBufferMemoryBarrier *pBufferMemBarriers, uint32_t imageMemBarrierCount, const VkImageMemoryBarrier *pImageMemBarriers) { bool skip = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(cmdBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(cmdBuffer), layer_data_map); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); if (pCB->activeRenderPass && memBarrierCount) { if (!pCB->activeRenderPass->hasSelfDependency[pCB->activeSubpass]) { @@ -8671,7 +8671,7 @@ bool validateEventStageMask(VkQueue queue, GLOBAL_CB_NODE *pCB, uint32_t eventCo VkPipelineStageFlags sourceStageMask) { bool skip_call = false; VkPipelineStageFlags stageMask = 0; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); for (uint32_t i = 0; i < eventCount; ++i) { auto event = pCB->events[firstEventIndex + i]; auto queue_data = dev_data->queueMap.find(queue); @@ -8764,7 +8764,7 @@ bool ValidateStageMasksAgainstQueueCapabilities(layer_data *dev_data, GLOBAL_CB_ const char *function, UNIQUE_VALIDATION_ERROR_CODE error_code) { bool skip = false; uint32_t queue_family_index = dev_data->commandPoolMap[cb_state->createInfo.commandPool].queueFamilyIndex; - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(dev_data->physical_device), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(dev_data->physical_device), instance_layer_data_map); auto physical_device_state = getPhysicalDeviceState(instance_data, dev_data->physical_device); // Any pipeline stage included in srcStageMask or dstStageMask must be supported by the capabilities of the queue family @@ -8792,7 +8792,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers) { bool skip = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *cb_state = getCBNode(dev_data, commandBuffer); if (cb_state) { @@ -8840,7 +8840,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(VkCommandBuffer commandBuffer, VkP uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers) { bool skip = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *cb_state = getCBNode(dev_data, commandBuffer); if (cb_state) { @@ -8864,7 +8864,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(VkCommandBuffer commandBuffer, VkP } bool setQueryState(VkQueue queue, VkCommandBuffer commandBuffer, QueryObject object, bool value) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { pCB->queryToStateMap[object] = value; @@ -8878,7 +8878,7 @@ bool setQueryState(VkQueue queue, VkCommandBuffer commandBuffer, QueryObject obj VKAPI_ATTR void VKAPI_CALL CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot, VkFlags flags) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -8898,7 +8898,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryP VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -8929,7 +8929,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPoo VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -8955,7 +8955,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQu bool validateQuery(VkQueue queue, GLOBAL_CB_NODE *pCB, VkQueryPool queryPool, uint32_t queryCount, uint32_t firstQuery) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(pCB->commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(pCB->commandBuffer), layer_data_map); auto queue_data = dev_data->queueMap.find(queue); if (queue_data == dev_data->queueMap.end()) return false; for (uint32_t i = 0; i < queryCount; i++) { @@ -8990,7 +8990,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto cb_node = getCBNode(dev_data, commandBuffer); @@ -9032,7 +9032,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -9126,7 +9126,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPip VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t slot) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -9352,7 +9352,7 @@ static void PostCallRecordCreateFramebuffer(layer_data *dev_data, const VkFrameb VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFramebuffer *pFramebuffer) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip_call = PreCallValidateCreateFramebuffer(dev_data, pCreateInfo); lock.unlock(); @@ -9622,7 +9622,7 @@ static bool CreatePassDAG(const layer_data *dev_data, VkDevice device, const VkR VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; spv_result_t spv_valid = SPV_SUCCESS; @@ -9760,7 +9760,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); // TODO: As part of wrapping up the mem_tracker/core_validation merge the following routine should be consolidated with @@ -9877,7 +9877,7 @@ static bool FormatSpecificLoadAndStoreOpSettings(VkFormat format, T color_depth_ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin, VkSubpassContents contents) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *cb_node = getCBNode(dev_data, commandBuffer); auto render_pass_state = pRenderPassBegin ? getRenderPassState(dev_data, pRenderPassBegin->renderPass) : nullptr; @@ -9972,7 +9972,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, con VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -10006,7 +10006,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpa VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass(VkCommandBuffer commandBuffer) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); auto pCB = getCBNode(dev_data, commandBuffer); FRAMEBUFFER_STATE *framebuffer = NULL; @@ -10277,7 +10277,7 @@ static bool validateSecondaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount, const VkCommandBuffer *pCommandBuffers) { bool skip_call = false; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); std::unique_lock lock(global_lock); GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); if (pCB) { @@ -10383,7 +10383,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkFlags flags, void **ppData) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; @@ -10421,7 +10421,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory mem, Vk } VKAPI_ATTR void VKAPI_CALL UnmapMemory(VkDevice device, VkDeviceMemory mem) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; std::unique_lock lock(global_lock); @@ -10552,7 +10552,7 @@ static bool PreCallValidateFlushMappedMemoryRanges(layer_data *dev_data, uint32_ VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange *pMemRanges) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (!PreCallValidateFlushMappedMemoryRanges(dev_data, memRangeCount, pMemRanges)) { result = dev_data->dispatch_table.FlushMappedMemoryRanges(device, memRangeCount, pMemRanges); @@ -10578,7 +10578,7 @@ static void PostCallRecordInvalidateMappedMemoryRanges(layer_data *dev_data, uin VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange *pMemRanges) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (!PreCallValidateInvalidateMappedMemoryRanges(dev_data, memRangeCount, pMemRanges)) { result = dev_data->dispatch_table.InvalidateMappedMemoryRanges(device, memRangeCount, pMemRanges); @@ -10590,7 +10590,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges(VkDevice device, uin } VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize memoryOffset) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip_call = false; std::unique_lock lock(global_lock); @@ -10644,7 +10644,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory(VkDevice device, VkImage image, V VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { bool skip_call = false; VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); auto event_state = getEventNode(dev_data, event); if (event_state) { @@ -10673,7 +10673,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo, VkFence fence) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip_call = false; std::unique_lock lock(global_lock); @@ -10782,7 +10782,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse(VkQueue queue, uint32_t bindInfoC VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); if (result == VK_SUCCESS) { std::lock_guard lock(global_lock); @@ -10796,7 +10796,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphor VKAPI_ATTR VkResult VKAPI_CALL CreateEvent(VkDevice device, const VkEventCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkEvent *pEvent) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.CreateEvent(device, pCreateInfo, pAllocator, pEvent); if (result == VK_SUCCESS) { std::lock_guard lock(global_lock); @@ -11045,7 +11045,7 @@ static void PostCallRecordCreateSwapchainKHR(layer_data *dev_data, VkResult resu VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); auto surface_state = getSurfaceState(dev_data->instance_data, pCreateInfo->surface); auto old_swapchain_state = getSwapchainNode(dev_data, pCreateInfo->oldSwapchain); @@ -11061,7 +11061,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc } VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; std::unique_lock lock(global_lock); @@ -11099,7 +11099,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR s VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pCount, VkImage *pSwapchainImages) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = dev_data->dispatch_table.GetSwapchainImagesKHR(device, swapchain, pCount, pSwapchainImages); if (result == VK_SUCCESS && pSwapchainImages != NULL) { @@ -11150,7 +11150,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai } VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); bool skip_call = false; std::lock_guard lock(global_lock); @@ -11317,7 +11317,7 @@ static void PostCallRecordCreateSharedSwapchainsKHR(layer_data *dev_data, VkResu VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchains) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::vector surface_state; std::vector old_swapchain_state; @@ -11337,7 +11337,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32 VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; std::unique_lock lock(global_lock); @@ -11423,7 +11423,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) { bool skip_call = false; - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(instance_data); // For this instance, flag when vkEnumeratePhysicalDevices goes to QUERY_COUNT and then QUERY_DETAILS @@ -11551,7 +11551,7 @@ static void PostCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(PHYSICAL_DE VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkQueueFamilyProperties *pQueueFamilyProperties) { - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); auto physical_device_state = getPhysicalDeviceState(instance_data, physicalDevice); assert(physical_device_state); bool skip = @@ -11566,7 +11566,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevi VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR *pQueueFamilyProperties) { - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); auto physical_device_state = getPhysicalDeviceState(instance_data, physicalDevice); assert(physical_device_state); bool skip = PreCallValidateGetPhysicalDeviceQueueFamilyProperties2KHR(instance_data, physical_device_state, @@ -11583,7 +11583,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysical template static VkResult CreateSurface(VkInstance instance, TCreateInfo const *pCreateInfo, VkAllocationCallbacks const *pAllocator, VkSurfaceKHR *pSurface, FPtr fptr) { - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); // Call down the call chain: VkResult result = (instance_data->dispatch_table.*fptr)(instance, pCreateInfo, pAllocator, pSurface); @@ -11599,7 +11599,7 @@ static VkResult CreateSurface(VkInstance instance, TCreateInfo const *pCreateInf VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) { bool skip_call = false; - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); std::unique_lock lock(global_lock); auto surface_state = getSurfaceState(instance_data, surface); @@ -11664,7 +11664,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR(VkInstance instance, const V VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) { - auto instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); std::unique_lock lock(global_lock); auto physical_device_state = getPhysicalDeviceState(instance_data, physicalDevice); @@ -11683,7 +11683,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysica VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported) { - auto instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); std::unique_lock lock(global_lock); auto surface_state = getSurfaceState(instance_data, surface); lock.unlock(); @@ -11702,7 +11702,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes) { bool skip_call = false; - auto instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); std::unique_lock lock(global_lock); // TODO: this isn't quite right. available modes may differ by surface AND physical device. auto physical_device_state = getPhysicalDeviceState(instance_data, physicalDevice); @@ -11763,7 +11763,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevi uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats) { bool skip_call = false; - auto instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); std::unique_lock lock(global_lock); auto physical_device_state = getPhysicalDeviceState(instance_data, physicalDevice); auto &call_state = physical_device_state->vkGetPhysicalDeviceSurfaceFormatsKHRState; @@ -11827,7 +11827,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pMsgCallback) { - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); VkResult res = instance_data->dispatch_table.CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pMsgCallback); if (VK_SUCCESS == res) { std::lock_guard lock(global_lock); @@ -11838,7 +11838,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT msgCallback, const VkAllocationCallbacks *pAllocator) { - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); instance_data->dispatch_table.DestroyDebugReportCallbackEXT(instance, msgCallback, pAllocator); std::lock_guard lock(global_lock); layer_destroy_msg_callback(instance_data->report_data, msgCallback, pAllocator); @@ -11847,7 +11847,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg) { - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); instance_data->dispatch_table.DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); } @@ -11874,7 +11874,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi assert(physicalDevice); - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); return instance_data->dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } @@ -11897,7 +11897,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice dev, const c proc = intercept_khr_swapchain_command(funcName, dev); if (proc) return proc; - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(dev), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(dev), layer_data_map); auto &table = dev_data->dispatch_table; if (!table.GetDeviceProcAddr) return nullptr; @@ -11913,7 +11913,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance assert(instance); - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); proc = debug_report_get_instance_proc_addr(instance_data->report_data, funcName); if (proc) return proc; @@ -11928,7 +11928,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { assert(instance); - instance_layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); auto &table = instance_data->dispatch_table; if (!table.GetPhysicalDeviceProcAddr) return nullptr; @@ -12106,7 +12106,7 @@ static PFN_vkVoidFunction intercept_khr_swapchain_command(const char *name, VkDe layer_data *dev_data = nullptr; if (dev) { - dev_data = get_my_data_ptr(get_dispatch_key(dev), layer_data_map); + dev_data = GetLayerDataPtr(get_dispatch_key(dev), layer_data_map); if (!dev_data->device_extensions.wsi_enabled) return nullptr; } @@ -12169,7 +12169,7 @@ static PFN_vkVoidFunction intercept_khr_surface_command(const char *name, VkInst instance_layer_data *instance_data = nullptr; if (instance) { - instance_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); } for (size_t i = 0; i < ARRAY_SIZE(khr_surface_commands); i++) { diff --git a/layers/image.cpp b/layers/image.cpp index 31a28e2..b86f463 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -96,7 +96,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pMsgCallback) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkResult res = my_data->instance_dispatch_table->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pMsgCallback); if (res == VK_SUCCESS) { res = layer_create_msg_callback(my_data->report_data, false, pCreateInfo, pAllocator, pMsgCallback); @@ -106,7 +106,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT msgCallback, const VkAllocationCallbacks *pAllocator) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); my_data->instance_dispatch_table->DestroyDebugReportCallbackEXT(instance, msgCallback, pAllocator); layer_destroy_msg_callback(my_data->report_data, msgCallback, pAllocator); } @@ -114,7 +114,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); my_data->instance_dispatch_table->DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); } @@ -136,7 +136,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); if (result != VK_SUCCESS) return result; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(*pInstance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(*pInstance), layer_data_map); my_data->instance = *pInstance; my_data->instance_dispatch_table = new VkLayerInstanceDispatchTable; layer_init_instance_dispatch_table(*pInstance, my_data->instance_dispatch_table, fpGetInstanceProcAddr); @@ -151,7 +151,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) { // Grab the key before the instance is destroyed. dispatch_key key = get_dispatch_key(instance); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; pTable->DestroyInstance(instance, pAllocator); @@ -169,7 +169,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { - layer_data *my_instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); VkLayerDeviceCreateInfo *chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); assert(chain_info->u.pLayerInfo); @@ -188,7 +188,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con return result; } - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); // Setup device dispatch table my_device_data->device_dispatch_table = new VkLayerDispatchTable; @@ -205,7 +205,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(device); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); my_data->device_dispatch_table->DestroyDevice(device, pAllocator); delete my_data->device_dispatch_table; layer_data_map.erase(key); @@ -222,7 +222,7 @@ static const VkLayerProperties global_layer = { VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); result = device_data->device_dispatch_table->CreateImage(device, pCreateInfo, pAllocator, pImage); @@ -234,7 +234,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateI } VKAPI_ATTR void VKAPI_CALL DestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); device_data->imageMap.erase(image); lock.unlock(); @@ -320,7 +320,7 @@ static bool PreCallValidateCmdCopyImageToBuffer(layer_data *dev_data, VkImage sr VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!PreCallValidateCmdCopyImageToBuffer(device_data, srcImage, regionCount, pRegions, "vkCmdCopyImageToBuffer()")) { device_data->device_dispatch_table->CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, @@ -336,7 +336,7 @@ static bool PreCallValidateCmdCopyBufferToImage(layer_data *dev_data, VkImage ds VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy *pRegions) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!PreCallValidateCmdCopyBufferToImage(device_data, dstImage, regionCount, pRegions, "vkCmdCopyBufferToImage()")) { device_data->device_dispatch_table->CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, @@ -345,7 +345,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V } VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties) { - layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *phy_dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); phy_dev_data->instance_dispatch_table->GetPhysicalDeviceProperties(physicalDevice, pProperties); } @@ -374,7 +374,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi assert(physicalDevice); dispatch_key key = get_dispatch_key(physicalDevice); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; return pTable->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } @@ -388,7 +388,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, cons assert(device); - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkLayerDispatchTable *pTable = my_data->device_dispatch_table; { @@ -403,7 +403,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance if (proc) return proc; assert(instance); - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); proc = debug_report_get_instance_proc_addr(my_data->report_data, funcName); if (proc) return proc; @@ -416,7 +416,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { assert(instance); - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; if (pTable->GetPhysicalDeviceProcAddr == NULL) return NULL; diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp index 39d1c63..6e23d30 100644 --- a/layers/object_tracker.cpp +++ b/layers/object_tracker.cpp @@ -54,7 +54,7 @@ static void InitObjectTracker(layer_data *my_data, const VkAllocationCallbacks * // Add new queue to head of global queue list static void AddQueueInfo(VkDevice device, uint32_t queue_node_index, VkQueue queue) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); auto queueItem = device_data->queue_info_map.find(queue); if (queueItem == device_data->queue_info_map.end()) { OT_QUEUE_INFO *p_queue_info = new OT_QUEUE_INFO; @@ -73,7 +73,7 @@ static void AddQueueInfo(VkDevice device, uint32_t queue_node_index, VkQueue que // Destroy memRef lists and free all memory static void DestroyQueueDataStructures(VkDevice device) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); for (auto queue_item : device_data->queue_info_map) { delete queue_item.second; @@ -99,12 +99,12 @@ static void DestroyQueueDataStructures(VkDevice device) { // Check Queue type flags for selected queue operations static void ValidateQueueFlags(VkQueue queue, const char *function) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); auto queue_item = device_data->queue_info_map.find(queue); if (queue_item != device_data->queue_info_map.end()) { OT_QUEUE_INFO *pQueueInfo = queue_item->second; if (pQueueInfo != NULL) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(device_data->physical_device), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(device_data->physical_device), layer_data_map); if ((instance_data->queue_family_properties[pQueueInfo->queue_node_index].queueFlags & VK_QUEUE_SPARSE_BINDING_BIT) == 0) { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, @@ -118,7 +118,7 @@ static void ValidateQueueFlags(VkQueue queue, const char *function) { static void AllocateCommandBuffer(VkDevice device, const VkCommandPool command_pool, const VkCommandBuffer command_buffer, VkDebugReportObjectTypeEXT object_type, VkCommandBufferLevel level) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, object_type, reinterpret_cast(command_buffer), __LINE__, OBJTRACK_NONE, LayerName, @@ -140,7 +140,7 @@ static void AllocateCommandBuffer(VkDevice device, const VkCommandPool command_p } static bool ValidateCommandBuffer(VkDevice device, VkCommandPool command_pool, VkCommandBuffer command_buffer) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; uint64_t object_handle = reinterpret_cast(command_buffer); if (device_data->object_map[VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT].find(object_handle) != @@ -168,7 +168,7 @@ static bool ValidateCommandBuffer(VkDevice device, VkCommandPool command_pool, V static void AllocateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_pool, VkDescriptorSet descriptor_set, VkDebugReportObjectTypeEXT object_type) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, object_type, reinterpret_cast(descriptor_set), __LINE__, OBJTRACK_NONE, LayerName, @@ -187,7 +187,7 @@ static void AllocateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_p } static bool ValidateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_pool, VkDescriptorSet descriptor_set) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; uint64_t object_handle = reinterpret_cast(descriptor_set); auto dsItem = device_data->object_map[VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT].find(object_handle); @@ -213,7 +213,7 @@ static bool ValidateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_p } static void CreateQueue(VkDevice device, VkQueue vkObj, VkDebugReportObjectTypeEXT object_type) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, object_type, reinterpret_cast(vkObj), __LINE__, OBJTRACK_NONE, LayerName, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, @@ -235,7 +235,7 @@ static void CreateQueue(VkDevice device, VkQueue vkObj, VkDebugReportObjectTypeE } static void CreateSwapchainImageObject(VkDevice dispatchable_object, VkImage swapchain_image, VkSwapchainKHR swapchain) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(dispatchable_object), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(dispatchable_object), layer_data_map); log_msg(device_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, reinterpret_cast(swapchain_image), __LINE__, OBJTRACK_NONE, LayerName, "OBJ[0x%" PRIxLEAST64 "] : CREATE %s object 0x%" PRIxLEAST64, object_track_index++, "SwapchainImage", @@ -261,7 +261,7 @@ uint64_t handle_value(T *handle) { template static void CreateObject(T1 dispatchable_object, T2 object, VkDebugReportObjectTypeEXT object_type, const VkAllocationCallbacks *pAllocator) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(dispatchable_object), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(dispatchable_object), layer_data_map); auto object_handle = handle_value(object); bool custom_allocator = pAllocator != nullptr; @@ -286,7 +286,7 @@ template static void DestroyObject(T1 dispatchable_object, T2 object, VkDebugReportObjectTypeEXT object_type, const VkAllocationCallbacks *pAllocator, enum UNIQUE_VALIDATION_ERROR_CODE expected_custom_allocator_code, enum UNIQUE_VALIDATION_ERROR_CODE expected_default_allocator_code) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(dispatchable_object), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(dispatchable_object), layer_data_map); auto object_handle = handle_value(object); bool custom_allocator = pAllocator != nullptr; @@ -341,7 +341,7 @@ static bool ValidateObject(T1 dispatchable_object, T2 object, VkDebugReportObjec } auto object_handle = handle_value(object); - layer_data *device_data = get_my_data_ptr(get_dispatch_key(dispatchable_object), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(dispatchable_object), layer_data_map); if (device_data->object_map[object_type].find(object_handle) == device_data->object_map[object_type].end()) { // If object is an image, also look for it in the swapchain image map if ((object_type != VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT) || @@ -357,7 +357,7 @@ static bool ValidateObject(T1 dispatchable_object, T2 object, VkDebugReportObjec static void DeviceReportUndestroyedObjects(VkDevice device, VkDebugReportObjectTypeEXT object_type, enum UNIQUE_VALIDATION_ERROR_CODE error_code) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); for (auto item = device_data->object_map[object_type].begin(); item != device_data->object_map[object_type].end();) { OBJTRACK_NODE *object_info = item->second; log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_info->object_type, object_info->handle, __LINE__, @@ -373,7 +373,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati std::unique_lock lock(global_lock); dispatch_key key = get_dispatch_key(instance); - layer_data *instance_data = get_my_data_ptr(key, layer_data_map); + layer_data *instance_data = GetLayerDataPtr(key, layer_data_map); // Enable the temporary callback(s) here to catch cleanup issues: bool callback_setup = false; @@ -1567,7 +1567,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool(VkDevice device, VkDescriptor VkDescriptorPoolResetFlags flags) { bool skip_call = false; std::unique_lock lock(global_lock); - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); skip_call |= ValidateObject(device, descriptorPool, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, false, VALIDATION_ERROR_00930); skip_call |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_00929); @@ -1794,7 +1794,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool(VkDevice device, VkCommandPool c } VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer command_buffer, const VkCommandBufferBeginInfo *begin_info) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(command_buffer), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(command_buffer), layer_data_map); bool skip_call = false; { std::lock_guard lock(global_lock); @@ -2698,7 +2698,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc if (pCreateInfo) { skip_call |= ValidateObject(device, pCreateInfo->oldSwapchain, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, true, VALIDATION_ERROR_01935); - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); skip_call |= ValidateObject(device_data->physical_device, pCreateInfo->surface, VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT, false, VALIDATION_ERROR_01926); } @@ -2996,7 +2996,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32 for (i = 0; i < swapchainCount; i++) { skip_call |= ValidateObject(device, pCreateInfos[i].oldSwapchain, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, true, VALIDATION_ERROR_01935); - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); skip_call |= ValidateObject(device_data->physical_device, pCreateInfos[i].surface, VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT, false, VALIDATION_ERROR_01926); } @@ -3025,7 +3025,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VkLayerInstanceDispatchTable *pInstanceTable = get_dispatch_table(ot_instance_table_map, instance); VkResult result = pInstanceTable->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); if (VK_SUCCESS == result) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); result = layer_create_msg_callback(instance_data->report_data, false, pCreateInfo, pAllocator, pCallback); CreateObject(instance, *pCallback, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, pAllocator); } @@ -3036,7 +3036,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk const VkAllocationCallbacks *pAllocator) { VkLayerInstanceDispatchTable *pInstanceTable = get_dispatch_table(ot_instance_table_map, instance); pInstanceTable->DestroyDebugReportCallbackEXT(instance, msgCallback, pAllocator); - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); layer_destroy_msg_callback(instance_data->report_data, msgCallback, pAllocator); DestroyObject(instance, msgCallback, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, pAllocator, VALIDATION_ERROR_02049, VALIDATION_ERROR_02050); @@ -3084,7 +3084,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi } static inline PFN_vkVoidFunction InterceptMsgCallbackGetProcAddrCommand(const char *name, VkInstance instance) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); return debug_report_get_instance_proc_addr(instance_data->report_data, name); } @@ -3146,7 +3146,7 @@ static inline PFN_vkVoidFunction InterceptWsiEnabledCommand(const char *name, Vk } static void CheckDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo, VkDevice device) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); device_data->wsi_enabled = false; device_data->wsi_display_swapchain_enabled = false; device_data->wsi_display_extension_enabled = false; @@ -3224,7 +3224,7 @@ static void CheckInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateI VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { std::lock_guard lock(global_lock); - layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *phy_dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); VkLayerDeviceCreateInfo *chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); assert(chain_info->u.pLayerInfo); @@ -3243,7 +3243,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con return result; } - layer_data *device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); device_data->report_data = layer_debug_report_create_device(phy_dev_data->report_data, *pDevice); layer_init_device_dispatch_table(*pDevice, &device_data->dispatch_table, fpGetDeviceProcAddr); @@ -3274,7 +3274,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevi ->GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); std::lock_guard lock(global_lock); if (pQueueFamilyProperties != NULL) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { instance_data->queue_family_properties.resize(*pQueueFamilyPropertyCount); } @@ -3303,7 +3303,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat return result; } - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(*pInstance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(*pInstance), layer_data_map); instance_data->instance = *pInstance; initInstanceTable(*pInstance, fpGetInstanceProcAddr, ot_instance_table_map); VkLayerInstanceDispatchTable *pInstanceTable = get_dispatch_table(ot_instance_table_map, *pInstance); @@ -3504,7 +3504,7 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool com } } VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); // A swapchain's images are implicitly deleted when the swapchain is deleted. // Remove this swapchain's images from our map of such images. @@ -3556,7 +3556,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets(VkDevice device, VkDescriptorP VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator) { bool skip_call = VK_FALSE; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); skip_call |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_00904); skip_call |= @@ -3585,7 +3585,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool(VkDevice device, VkDescriptorPo } VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip_call = false; std::unique_lock lock(global_lock); skip_call |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_00080); @@ -3743,7 +3743,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, VkDeb if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.DebugMarkerSetObjectTagEXT) { result = dev_data->dispatch_table.DebugMarkerSetObjectTagEXT(device, pTagInfo); @@ -3759,7 +3759,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, VkDe if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.DebugMarkerSetObjectNameEXT) { result = dev_data->dispatch_table.DebugMarkerSetObjectNameEXT(device, pNameInfo); @@ -3773,7 +3773,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, skip_call |= ValidateObject(commandBuffer, commandBuffer, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, false, VALIDATION_ERROR_02014); lock.unlock(); - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!skip_call && dev_data->dispatch_table.CmdDebugMarkerBeginEXT) { dev_data->dispatch_table.CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); } @@ -3785,7 +3785,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { skip_call |= ValidateObject(commandBuffer, commandBuffer, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, false, VALIDATION_ERROR_02022); lock.unlock(); - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!skip_call && dev_data->dispatch_table.CmdDebugMarkerEndEXT) { dev_data->dispatch_table.CmdDebugMarkerEndEXT(commandBuffer); } @@ -3797,7 +3797,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer skip_call |= ValidateObject(commandBuffer, commandBuffer, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, false, VALIDATION_ERROR_02025); lock.unlock(); - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!skip_call && dev_data->dispatch_table.CmdDebugMarkerInsertEXT) { dev_data->dispatch_table.CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); } @@ -4074,7 +4074,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysical ->GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); std::lock_guard lock(global_lock); if (pQueueFamilyProperties != NULL) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { instance_data->queue_family_properties.resize(*pQueueFamilyPropertyCount); } @@ -4121,7 +4121,7 @@ VKAPI_ATTR void VKAPI_CALL CmdProcessCommandsNVX(VkCommandBuffer commandBuffer, skip_call |= ValidateObject(commandBuffer, commandBuffer, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, false, VALIDATION_ERROR_UNDEFINED); lock.unlock(); - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!skip_call && dev_data->dispatch_table.CmdProcessCommandsNVX) { dev_data->dispatch_table.CmdProcessCommandsNVX(commandBuffer, pProcessCommandsInfo); } @@ -4134,7 +4134,7 @@ VKAPI_ATTR void VKAPI_CALL CmdReserveSpaceForCommandsNVX(VkCommandBuffer command skip_call |= ValidateObject(commandBuffer, commandBuffer, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, false, VALIDATION_ERROR_UNDEFINED); lock.unlock(); - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (!skip_call && dev_data->dispatch_table.CmdReserveSpaceForCommandsNVX) { dev_data->dispatch_table.CmdReserveSpaceForCommandsNVX(commandBuffer, pReserveSpaceInfo); } @@ -4151,7 +4151,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNVX(VkDevice device, if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.CreateIndirectCommandsLayoutNVX) { result = dev_data->dispatch_table.CreateIndirectCommandsLayoutNVX(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); @@ -4166,7 +4166,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNVX(VkDevice device, VkI skip_call |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_UNDEFINED); lock.unlock(); if (!skip_call) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (dev_data->dispatch_table.DestroyIndirectCommandsLayoutNVX) { dev_data->dispatch_table.DestroyIndirectCommandsLayoutNVX(device, indirectCommandsLayout, pAllocator); } @@ -4182,7 +4182,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateObjectTableNVX(VkDevice device, const VkObj if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.CreateObjectTableNVX) { result = dev_data->dispatch_table.CreateObjectTableNVX(device, pCreateInfo, pAllocator, pObjectTable); @@ -4197,7 +4197,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyObjectTableNVX(VkDevice device, VkObjectTableN skip_call |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_UNDEFINED); lock.unlock(); if (!skip_call) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (dev_data->dispatch_table.DestroyObjectTableNVX) { dev_data->dispatch_table.DestroyObjectTableNVX(device, objectTable, pAllocator); } @@ -4214,7 +4214,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterObjectsNVX(VkDevice device, VkObjectTable if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.RegisterObjectsNVX) { result = @@ -4232,7 +4232,7 @@ VKAPI_ATTR VkResult VKAPI_CALL UnregisterObjectsNVX(VkDevice device, VkObjectTab if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.UnregisterObjectsNVX) { result = dev_data->dispatch_table.UnregisterObjectsNVX(device, objectTable, objectCount, pObjectEntryTypes, pObjectIndices); @@ -4342,7 +4342,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT(VkDevice device, VkDisplay if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.DisplayPowerControlEXT) { result = dev_data->dispatch_table.DisplayPowerControlEXT(device, display, pDisplayPowerInfo); @@ -4359,7 +4359,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT(VkDevice device, const VkD if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.RegisterDeviceEventEXT) { result = dev_data->dispatch_table.RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); @@ -4381,7 +4381,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT(VkDevice device, VkDispla if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.RegisterDisplayEventEXT) { result = dev_data->dispatch_table.RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); @@ -4402,7 +4402,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT(VkDevice device, VkSwapcha if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_SUCCESS; if (dev_data->dispatch_table.GetSwapchainCounterEXT) { result = dev_data->dispatch_table.GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); @@ -4578,7 +4578,7 @@ static inline PFN_vkVoidFunction InterceptCoreInstanceCommand(const char *name) static inline PFN_vkVoidFunction InterceptDeviceExtensionCommand(const char *name, VkDevice device) { if (device) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (!name || name[0] != 'v' || name[1] != 'k') return NULL; @@ -4640,7 +4640,7 @@ static inline PFN_vkVoidFunction InterceptInstanceExtensionCommand(const char *n static inline PFN_vkVoidFunction InterceptWsiEnabledCommand(const char *name, VkDevice device) { if (device) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (device_data->wsi_enabled) { if (!strcmp("vkCreateSwapchainKHR", name)) return reinterpret_cast(CreateSwapchainKHR); diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index cece042..5a4a4a1 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -108,7 +108,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pMsgCallback) { - auto data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); VkResult result = data->dispatch_table.CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pMsgCallback); if (result == VK_SUCCESS) { @@ -120,7 +120,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT msgCallback, const VkAllocationCallbacks *pAllocator) { - auto data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); data->dispatch_table.DestroyDebugReportCallbackEXT(instance, msgCallback, pAllocator); layer_destroy_msg_callback(data->report_data, msgCallback, pAllocator); @@ -129,7 +129,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg) { - auto data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); data->dispatch_table.DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); } @@ -1311,7 +1311,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); if (result == VK_SUCCESS) { - auto my_instance_data = get_my_data_ptr(get_dispatch_key(*pInstance), instance_layer_data_map); + auto my_instance_data = GetLayerDataPtr(get_dispatch_key(*pInstance), instance_layer_data_map); assert(my_instance_data != nullptr); layer_init_instance_dispatch_table(*pInstance, &my_instance_data->dispatch_table, fpGetInstanceProcAddr); @@ -1370,7 +1370,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati // Grab the key before the instance is destroyed. dispatch_key key = get_dispatch_key(instance); bool skip = false; - auto my_data = get_my_data_ptr(key, instance_layer_data_map); + auto my_data = GetLayerDataPtr(key, instance_layer_data_map); assert(my_data != NULL); // Enable the temporary callback(s) here to catch vkDestroyInstance issues: @@ -1412,7 +1412,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin VkPhysicalDevice *pPhysicalDevices) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkEnumeratePhysicalDevices(my_data->report_data, pPhysicalDeviceCount, pPhysicalDevices); @@ -1426,7 +1426,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceFeatures(my_data->report_data, pFeatures); @@ -1439,7 +1439,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDe VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceFormatProperties(my_data->report_data, format, pFormatProperties); @@ -1455,7 +1455,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties(VkPhysical VkImageFormatProperties *pImageFormatProperties) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceImageFormatProperties(my_data->report_data, format, type, tiling, usage, flags, @@ -1473,7 +1473,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties(VkPhysical VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceProperties(my_data->report_data, pProperties); @@ -1487,7 +1487,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevi uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceQueueFamilyProperties(my_data->report_data, pQueueFamilyPropertyCount, @@ -1502,7 +1502,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevi VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceMemoryProperties(my_data->report_data, pMemoryProperties); @@ -1516,7 +1516,7 @@ static void validateDeviceCreateInfo(VkPhysicalDevice physicalDevice, const VkDe const std::vector properties) { std::unordered_set set; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); if ((pCreateInfo != nullptr) && (pCreateInfo->pQueueCreateInfos != nullptr)) { for (uint32_t i = 0; i < pCreateInfo->queueCreateInfoCount; ++i) { @@ -1614,7 +1614,7 @@ static void CheckInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateI } static void CheckDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo, VkDevice device) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SWAPCHAIN_EXTENSION_NAME) == 0) { device_data->enables.khr_swapchain_enabled = true; @@ -1639,7 +1639,7 @@ static void CheckDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo, } void storeCreateDeviceData(VkDevice device, const VkDeviceCreateInfo *pCreateInfo) { - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if ((pCreateInfo != nullptr) && (pCreateInfo->pQueueCreateInfos != nullptr)) { for (uint32_t i = 0; i < pCreateInfo->queueCreateInfoCount; ++i) { @@ -1658,7 +1658,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_instance_data != nullptr); skip |= parameter_validation_vkCreateDevice(my_instance_data->report_data, pCreateInfo, pAllocator, pDevice); @@ -1718,7 +1718,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con validate_result(my_instance_data->report_data, "vkCreateDevice", result); if (result == VK_SUCCESS) { - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); assert(my_device_data != nullptr); my_device_data->report_data = layer_debug_report_create_device(my_instance_data->report_data, *pDevice); @@ -1755,7 +1755,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(device); bool skip = false; - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyDevice(my_data->report_data, pAllocator); @@ -1773,7 +1773,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall } static bool PreGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex) { - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_device_data != nullptr); validate_queue_family_index(my_device_data, "vkGetDeviceQueue", "queueFamilyIndex", queueFamilyIndex); @@ -1793,7 +1793,7 @@ static bool PreGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32 VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetDeviceQueue(my_data->report_data, queueFamilyIndex, queueIndex, pQueue); @@ -1808,7 +1808,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyI VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkQueueSubmit(my_data->report_data, submitCount, pSubmits, fence); @@ -1823,7 +1823,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit(VkQueue queue, uint32_t submitCount, } VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); assert(my_data != NULL); VkResult result = my_data->dispatch_table.QueueWaitIdle(queue); @@ -1834,7 +1834,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue) { } VKAPI_ATTR VkResult VKAPI_CALL DeviceWaitIdle(VkDevice device) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); VkResult result = my_data->dispatch_table.DeviceWaitIdle(device); @@ -1848,7 +1848,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAll const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkAllocateMemory(my_data->report_data, pAllocateInfo, pAllocator, pMemory); @@ -1864,7 +1864,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAll VKAPI_ATTR void VKAPI_CALL FreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkFreeMemory(my_data->report_data, memory, pAllocator); @@ -1878,7 +1878,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory memory, VkMemoryMapFlags flags, void **ppData) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkMapMemory(my_data->report_data, memory, offset, size, flags, ppData); @@ -1894,7 +1894,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory memory, VKAPI_ATTR void VKAPI_CALL UnmapMemory(VkDevice device, VkDeviceMemory memory) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkUnmapMemory(my_data->report_data, memory); @@ -1908,7 +1908,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges(VkDevice device, uint32_t const VkMappedMemoryRange *pMemoryRanges) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkFlushMappedMemoryRanges(my_data->report_data, memoryRangeCount, pMemoryRanges); @@ -1926,7 +1926,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges(VkDevice device, uin const VkMappedMemoryRange *pMemoryRanges) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkInvalidateMappedMemoryRanges(my_data->report_data, memoryRangeCount, pMemoryRanges); @@ -1943,7 +1943,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges(VkDevice device, uin VKAPI_ATTR void VKAPI_CALL GetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetDeviceMemoryCommitment(my_data->report_data, memory, pCommittedMemoryInBytes); @@ -1957,7 +1957,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer VkDeviceSize memoryOffset) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkBindBufferMemory(my_data->report_data, buffer, memory, memoryOffset); @@ -1974,7 +1974,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkBindImageMemory(my_data->report_data, image, memory, memoryOffset); @@ -1991,7 +1991,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory(VkDevice device, VkImage image, V VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetBufferMemoryRequirements(my_data->report_data, buffer, pMemoryRequirements); @@ -2003,7 +2003,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetImageMemoryRequirements(my_data->report_data, image, pMemoryRequirements); @@ -2015,7 +2015,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements(VkDevice device, VkImage i static bool PostGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pNumRequirements, VkSparseImageMemoryRequirements *pSparseMemoryRequirements) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (pSparseMemoryRequirements != nullptr) { if ((pSparseMemoryRequirements->formatProperties.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | @@ -2034,7 +2034,7 @@ static bool PostGetImageSparseMemoryRequirements(VkDevice device, VkImage image, VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *pSparseMemoryRequirements) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetImageSparseMemoryRequirements(my_data->report_data, image, pSparseMemoryRequirementCount, @@ -2052,7 +2052,7 @@ static bool PostGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice ph VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t *pNumProperties, VkSparseImageFormatProperties *pProperties) { - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); if (pProperties != nullptr) { if ((pProperties->aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { @@ -2073,7 +2073,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties(VkPhysic uint32_t *pPropertyCount, VkSparseImageFormatProperties *pProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceSparseImageFormatProperties(my_data->report_data, format, type, samples, usage, @@ -2092,7 +2092,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse(VkQueue queue, uint32_t bindInfoC VkFence fence) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkQueueBindSparse(my_data->report_data, bindInfoCount, pBindInfo, fence); @@ -2110,7 +2110,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence(VkDevice device, const VkFenceCreateI const VkAllocationCallbacks *pAllocator, VkFence *pFence) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateFence(my_data->report_data, pCreateInfo, pAllocator, pFence); @@ -2126,7 +2126,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence(VkDevice device, const VkFenceCreateI VKAPI_ATTR void VKAPI_CALL DestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyFence(my_data->report_data, fence, pAllocator); @@ -2139,7 +2139,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyFence(VkDevice device, VkFence fence, const Vk VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkResetFences(my_data->report_data, fenceCount, pFences); @@ -2156,7 +2156,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus(VkDevice device, VkFence fence) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetFenceStatus(my_data->report_data, fence); @@ -2174,7 +2174,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForFences(VkDevice device, uint32_t fenceCoun uint64_t timeout) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkWaitForFences(my_data->report_data, fenceCount, pFences, waitAll, timeout); @@ -2192,7 +2192,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphor const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateSemaphore(my_data->report_data, pCreateInfo, pAllocator, pSemaphore); @@ -2208,7 +2208,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphor VKAPI_ATTR void VKAPI_CALL DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroySemaphore(my_data->report_data, semaphore, pAllocator); @@ -2222,7 +2222,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateEvent(VkDevice device, const VkEventCreateI const VkAllocationCallbacks *pAllocator, VkEvent *pEvent) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateEvent(my_data->report_data, pCreateInfo, pAllocator, pEvent); @@ -2238,7 +2238,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateEvent(VkDevice device, const VkEventCreateI VKAPI_ATTR void VKAPI_CALL DestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyEvent(my_data->report_data, event, pAllocator); @@ -2251,7 +2251,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyEvent(VkDevice device, VkEvent event, const Vk VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus(VkDevice device, VkEvent event) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetEventStatus(my_data->report_data, event); @@ -2268,7 +2268,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus(VkDevice device, VkEvent event) { VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkSetEvent(my_data->report_data, event); @@ -2285,7 +2285,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { VKAPI_ATTR VkResult VKAPI_CALL ResetEvent(VkDevice device, VkEvent event) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkResetEvent(my_data->report_data, event); @@ -2303,7 +2303,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoo const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -2335,7 +2335,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoo VKAPI_ATTR void VKAPI_CALL DestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyQueryPool(my_data->report_data, queryPool, pAllocator); @@ -2349,7 +2349,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults(VkDevice device, VkQueryPool size_t dataSize, void *pData, VkDeviceSize stride, VkQueryResultFlags flags) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetQueryPoolResults(my_data->report_data, queryPool, firstQuery, queryCount, dataSize, pData, @@ -2369,7 +2369,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreat const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -2430,7 +2430,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreat VKAPI_ATTR void VKAPI_CALL DestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyBuffer(my_data->report_data, buffer, pAllocator); @@ -2444,7 +2444,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView(VkDevice device, const VkBufferV const VkAllocationCallbacks *pAllocator, VkBufferView *pView) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateBufferView(my_data->report_data, pCreateInfo, pAllocator, pView); @@ -2460,7 +2460,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView(VkDevice device, const VkBufferV VKAPI_ATTR void VKAPI_CALL DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyBufferView(my_data->report_data, bufferView, pAllocator); @@ -2474,7 +2474,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateI const VkAllocationCallbacks *pAllocator, VkImage *pImage) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -2660,7 +2660,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateI VKAPI_ATTR void VKAPI_CALL DestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyImage(my_data->report_data, image, pAllocator); @@ -2671,7 +2671,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyImage(VkDevice device, VkImage image, const Vk } static bool PreGetImageSubresourceLayout(VkDevice device, const VkImageSubresource *pSubresource) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (pSubresource != nullptr) { if ((pSubresource->aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { @@ -2688,7 +2688,7 @@ static bool PreGetImageSubresourceLayout(VkDevice device, const VkImageSubresour VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetImageSubresourceLayout(my_data->report_data, image, pSubresource, pLayout); @@ -2704,7 +2704,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView(VkDevice device, const VkImageVie const VkAllocationCallbacks *pAllocator, VkImageView *pView) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); debug_report_data *report_data = my_data->report_data; @@ -2775,7 +2775,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView(VkDevice device, const VkImageVie VKAPI_ATTR void VKAPI_CALL DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyImageView(my_data->report_data, imageView, pAllocator); @@ -2789,7 +2789,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShade const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateShaderModule(my_data->report_data, pCreateInfo, pAllocator, pShaderModule); @@ -2806,7 +2806,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShade VKAPI_ATTR void VKAPI_CALL DestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyShaderModule(my_data->report_data, shaderModule, pAllocator); @@ -2820,7 +2820,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache(VkDevice device, const VkPipe const VkAllocationCallbacks *pAllocator, VkPipelineCache *pPipelineCache) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreatePipelineCache(my_data->report_data, pCreateInfo, pAllocator, pPipelineCache); @@ -2837,7 +2837,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache(VkDevice device, const VkPipe VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyPipelineCache(my_data->report_data, pipelineCache, pAllocator); @@ -2851,7 +2851,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData(VkDevice device, VkPipelineC void *pData) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPipelineCacheData(my_data->report_data, pipelineCache, pDataSize, pData); @@ -2869,7 +2869,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches(VkDevice device, VkPipelineCa const VkPipelineCache *pSrcCaches) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkMergePipelineCaches(my_data->report_data, dstCache, srcCacheCount, pSrcCaches); @@ -2884,7 +2884,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches(VkDevice device, VkPipelineCa } static bool PreCreateGraphicsPipelines(VkDevice device, const VkGraphicsPipelineCreateInfo *pCreateInfos) { - layer_data *data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // TODO: Handle count if (pCreateInfos != nullptr) { @@ -2951,7 +2951,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -3382,7 +3382,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli } bool PreCreateComputePipelines(VkDevice device, const VkComputePipelineCreateInfo *pCreateInfos) { - layer_data *data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (pCreateInfos != nullptr) { // TODO: Handle count! @@ -3399,7 +3399,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateComputePipelines(my_data->report_data, pipelineCache, createInfoCount, pCreateInfos, @@ -3419,7 +3419,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin VKAPI_ATTR void VKAPI_CALL DestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyPipeline(my_data->report_data, pipeline, pAllocator); @@ -3433,7 +3433,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPip const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreatePipelineLayout(my_data->report_data, pCreateInfo, pAllocator, pPipelineLayout); @@ -3450,7 +3450,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPip VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyPipelineLayout(my_data->report_data, pipelineLayout, pAllocator); @@ -3464,7 +3464,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCre const VkAllocationCallbacks *pAllocator, VkSampler *pSampler) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != NULL); debug_report_data *report_data = device_data->report_data; @@ -3499,7 +3499,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCre VKAPI_ATTR void VKAPI_CALL DestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroySampler(my_data->report_data, sampler, pAllocator); @@ -3514,7 +3514,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayout *pSetLayout) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -3569,7 +3569,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout(VkDevice device, const VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyDescriptorSetLayout(my_data->report_data, descriptorSetLayout, pAllocator); @@ -3583,7 +3583,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDes const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateDescriptorPool(my_data->report_data, pCreateInfo, pAllocator, pDescriptorPool); @@ -3602,7 +3602,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDes VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyDescriptorPool(my_data->report_data, descriptorPool, pAllocator); @@ -3616,7 +3616,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool(VkDevice device, VkDescriptor VkDescriptorPoolResetFlags flags) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkResetDescriptorPool(my_data->report_data, descriptorPool, flags); @@ -3634,7 +3634,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkD VkDescriptorSet *pDescriptorSets) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkAllocateDescriptorSets(my_data->report_data, pAllocateInfo, pDescriptorSets); @@ -3652,7 +3652,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets(VkDevice device, VkDescriptorP const VkDescriptorSet *pDescriptorSets) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -3677,7 +3677,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets(VkDevice device, uint32_t descri const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies) { bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != NULL); debug_report_data *report_data = device_data->report_data; @@ -3820,7 +3820,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer(VkDevice device, const VkFrameb const VkAllocationCallbacks *pAllocator, VkFramebuffer *pFramebuffer) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateFramebuffer(my_data->report_data, pCreateInfo, pAllocator, pFramebuffer); @@ -3836,7 +3836,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer(VkDevice device, const VkFrameb VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyFramebuffer(my_data->report_data, framebuffer, pAllocator); @@ -3876,7 +3876,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCreateRenderPass(my_data->report_data, pCreateInfo, pAllocator, pRenderPass); @@ -3893,7 +3893,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyRenderPass(my_data->report_data, renderPass, pAllocator); @@ -3905,7 +3905,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass rende VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D *pGranularity) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetRenderAreaGranularity(my_data->report_data, renderPass, pGranularity); @@ -3919,7 +3919,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool(VkDevice device, const VkComman const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= @@ -3938,7 +3938,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool(VkDevice device, const VkComman VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkDestroyCommandPool(my_data->report_data, commandPool, pAllocator); @@ -3951,7 +3951,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool com VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkResetCommandPool(my_data->report_data, commandPool, flags); @@ -3969,7 +3969,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkC VkCommandBuffer *pCommandBuffers) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkAllocateCommandBuffers(my_data->report_data, pAllocateInfo, pCommandBuffers); @@ -3986,7 +3986,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkC VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) { bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -4027,7 +4027,7 @@ static bool PreBeginCommandBuffer(layer_data *dev_data, VkCommandBuffer commandB VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(device_data != nullptr); debug_report_data *report_data = device_data->report_data; @@ -4068,7 +4068,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, } VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); VkResult result = my_data->dispatch_table.EndCommandBuffer(commandBuffer); @@ -4080,7 +4080,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); bool skip = parameter_validation_vkResetCommandBuffer(my_data->report_data, flags); @@ -4097,7 +4097,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdBindPipeline(my_data->report_data, pipelineBindPoint, pipeline); @@ -4177,7 +4177,7 @@ static bool preCmdSetViewport(layer_data *my_data, uint32_t viewport_count, cons VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= preCmdSetViewport(my_data, viewportCount, pViewports); @@ -4190,7 +4190,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); debug_report_data *report_data = my_data->report_data; @@ -4228,19 +4228,19 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t } VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); my_data->dispatch_table.CmdSetLineWidth(commandBuffer, lineWidth); } VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); my_data->dispatch_table.CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); } VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdSetBlendConstants(my_data->report_data, blendConstants); @@ -4251,14 +4251,14 @@ VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, c } VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); my_data->dispatch_table.CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); } VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdSetStencilCompareMask(my_data->report_data, faceMask, compareMask); @@ -4270,7 +4270,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdSetStencilWriteMask(my_data->report_data, faceMask, writeMask); @@ -4282,7 +4282,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdSetStencilReference(my_data->report_data, faceMask, reference); @@ -4297,7 +4297,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdBindDescriptorSets(my_data->report_data, pipelineBindPoint, layout, firstSet, @@ -4312,7 +4312,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdBindIndexBuffer(my_data->report_data, buffer, offset, indexType); @@ -4325,7 +4325,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkB VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdBindVertexBuffers(my_data->report_data, firstBinding, bindingCount, pBuffers, pOffsets); @@ -4337,7 +4337,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, u static bool PreCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (vertexCount == 0) { // TODO: Verify against Valid Usage section. I don't see a non-zero vertexCount listed, may need to add that and make // this an error or leave as is. @@ -4359,7 +4359,7 @@ static bool PreCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint VKAPI_ATTR void VKAPI_CALL CmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); PreCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); my_data->dispatch_table.CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); @@ -4367,14 +4367,14 @@ VKAPI_ATTR void VKAPI_CALL CmdDraw(VkCommandBuffer commandBuffer, uint32_t verte VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); my_data->dispatch_table.CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); } VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdDrawIndirect(my_data->report_data, buffer, offset, count, stride); @@ -4387,7 +4387,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuff VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdDrawIndexedIndirect(my_data->report_data, buffer, offset, count, stride); @@ -4398,13 +4398,13 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, } VKAPI_ATTR void VKAPI_CALL CmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); my_data->dispatch_table.CmdDispatch(commandBuffer, x, y, z); } VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdDispatchIndirect(my_data->report_data, buffer, offset); @@ -4417,7 +4417,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect(VkCommandBuffer commandBuffer, Vk VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy *pRegions) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdCopyBuffer(my_data->report_data, srcBuffer, dstBuffer, regionCount, pRegions); @@ -4428,7 +4428,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer } static bool PreCmdCopyImage(VkCommandBuffer commandBuffer, const VkImageCopy *pRegions) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (pRegions != nullptr) { if ((pRegions->srcSubresource.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { @@ -4457,7 +4457,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage(VkCommandBuffer commandBuffer, VkImage s VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy *pRegions) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdCopyImage(my_data->report_data, srcImage, srcImageLayout, dstImage, dstImageLayout, @@ -4472,7 +4472,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage(VkCommandBuffer commandBuffer, VkImage s } static bool PreCmdBlitImage(VkCommandBuffer commandBuffer, const VkImageBlit *pRegions) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (pRegions != nullptr) { if ((pRegions->srcSubresource.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { @@ -4497,7 +4497,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage(VkCommandBuffer commandBuffer, VkImage s VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdBlitImage(my_data->report_data, srcImage, srcImageLayout, dstImage, dstImageLayout, @@ -4512,7 +4512,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage(VkCommandBuffer commandBuffer, VkImage s } static bool PreCmdCopyBufferToImage(VkCommandBuffer commandBuffer, const VkBufferImageCopy *pRegions) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (pRegions != nullptr) { if ((pRegions->imageSubresource.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { @@ -4531,7 +4531,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy *pRegions) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdCopyBufferToImage(my_data->report_data, srcBuffer, dstImage, dstImageLayout, regionCount, @@ -4545,7 +4545,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V } static bool PreCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, const VkBufferImageCopy *pRegions) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (pRegions != nullptr) { if ((pRegions->imageSubresource.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { @@ -4563,7 +4563,7 @@ static bool PreCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, const VkBuffe VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdCopyImageToBuffer(my_data->report_data, srcImage, srcImageLayout, dstBuffer, regionCount, @@ -4579,7 +4579,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, V VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const uint32_t *pData) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdUpdateBuffer(my_data->report_data, dstBuffer, dstOffset, dataSize, pData); @@ -4611,7 +4611,7 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuff VKAPI_ATTR void VKAPI_CALL CmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdFillBuffer(my_data->report_data, dstBuffer, dstOffset, size, data); @@ -4646,7 +4646,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearColorImage(VkCommandBuffer commandBuffer, VkI const VkClearColorValue *pColor, uint32_t rangeCount, const VkImageSubresourceRange *pRanges) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdClearColorImage(my_data->report_data, image, imageLayout, pColor, rangeCount, pRanges); @@ -4660,7 +4660,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage(VkCommandBuffer commandBuff const VkClearDepthStencilValue *pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange *pRanges) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdClearDepthStencilImage(my_data->report_data, image, imageLayout, pDepthStencil, rangeCount, @@ -4675,7 +4675,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui const VkClearAttachment *pAttachments, uint32_t rectCount, const VkClearRect *pRects) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdClearAttachments(my_data->report_data, attachmentCount, pAttachments, rectCount, pRects); @@ -4686,7 +4686,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui } static bool PreCmdResolveImage(VkCommandBuffer commandBuffer, const VkImageResolve *pRegions) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); if (pRegions != nullptr) { if ((pRegions->srcSubresource.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { @@ -4713,7 +4713,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImag VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve *pRegions) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdResolveImage(my_data->report_data, srcImage, srcImageLayout, dstImage, dstImageLayout, @@ -4729,7 +4729,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImag VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdSetEvent(my_data->report_data, event, stageMask); @@ -4741,7 +4741,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent ev VKAPI_ATTR void VKAPI_CALL CmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdResetEvent(my_data->report_data, event, stageMask); @@ -4757,7 +4757,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdWaitEvents(my_data->report_data, eventCount, pEvents, srcStageMask, dstStageMask, @@ -4777,7 +4777,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(VkCommandBuffer commandBuffer, VkP uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdPipelineBarrier(my_data->report_data, srcStageMask, dstStageMask, dependencyFlags, @@ -4794,7 +4794,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(VkCommandBuffer commandBuffer, VkP VKAPI_ATTR void VKAPI_CALL CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdBeginQuery(my_data->report_data, queryPool, slot, flags); @@ -4806,7 +4806,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryP VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdEndQuery(my_data->report_data, queryPool, slot); @@ -4819,7 +4819,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPoo VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdResetQueryPool(my_data->report_data, queryPool, firstQuery, queryCount); @@ -4839,7 +4839,7 @@ bool PostCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBit VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdWriteTimestamp(my_data->report_data, pipelineStage, queryPool, query); @@ -4855,7 +4855,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdCopyQueryPoolResults(my_data->report_data, queryPool, firstQuery, queryCount, dstBuffer, @@ -4870,7 +4870,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdPushConstants(my_data->report_data, layout, stageFlags, offset, size, pValues); @@ -4883,7 +4883,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPip VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin, VkSubpassContents contents) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdBeginRenderPass(my_data->report_data, pRenderPassBegin, contents); @@ -4895,7 +4895,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, con VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdNextSubpass(my_data->report_data, contents); @@ -4906,14 +4906,14 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpa } VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass(VkCommandBuffer commandBuffer) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); my_data->dispatch_table.CmdEndRenderPass(commandBuffer); } VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkCmdExecuteCommands(my_data->report_data, commandBufferCount, pCommandBuffers); @@ -4947,7 +4947,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi assert(physicalDevice); - return get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map) + return GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map) ->dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } @@ -4968,7 +4968,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.khr_swapchain_enabled, "vkCreateSwapchainKHR", @@ -4989,7 +4989,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai VkImage *pSwapchainImages) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.khr_swapchain_enabled, "vkGetSwapchainImagesKHR", @@ -5010,7 +5010,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.khr_swapchain_enabled, "vkAcquireNextImageKHR", @@ -5030,7 +5030,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.khr_swapchain_enabled, "vkQueuePresentKHR", @@ -5049,7 +5049,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.khr_swapchain_enabled, "vkDestroySwapchainKHR", @@ -5064,7 +5064,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR s static bool require_instance_extension(void *instance, bool instance_extension_enables::*flag, char const *function_name, char const *extension_name) { - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); if (!(my_data->extensions.*flag)) { return log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, reinterpret_cast(instance), __LINE__, EXTENSION_NOT_ENABLED, LayerName, @@ -5079,7 +5079,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevi VkSurfaceKHR surface, VkBool32 *pSupported) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::surface_enabled, @@ -5100,7 +5100,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysica VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::surface_enabled, @@ -5122,7 +5122,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevi VkSurfaceFormatKHR *pSurfaceFormats) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::surface_enabled, @@ -5146,7 +5146,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica VkPresentModeKHR *pPresentModes) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::surface_enabled, @@ -5167,7 +5167,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); skip |= require_instance_extension(instance, &instance_extension_enables::surface_enabled, "vkDestroySurfaceKHR", VK_KHR_SURFACE_EXTENSION_NAME); @@ -5182,7 +5182,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR(VkInstance instance, const const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5204,7 +5204,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR(VkPh uint32_t queueFamilyIndex) { VkBool32 result = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5227,7 +5227,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR(VkInstance instance, const Vk const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5250,7 +5250,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR(VkPhys xcb_visualid_t visual_id) { VkBool32 result = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5274,7 +5274,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR(VkInstance instance, const V const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5297,7 +5297,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR(VkPhy VisualID visualID) { VkBool32 result = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5320,7 +5320,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMirSurfaceKHR(VkInstance instance, const Vk const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5342,7 +5342,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceMirPresentationSupportKHR(VkPhys uint32_t queueFamilyIndex, MirConnection *connection) { VkBool32 result = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5364,7 +5364,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR(VkInstance instance, cons const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5387,7 +5387,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR(Vk struct wl_display *display) { VkBool32 result = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5409,7 +5409,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR(VkInstance instance, cons const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); bool skip = false; @@ -5433,7 +5433,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32 const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchains) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.khr_display_swapchain_enabled, "vkCreateSharedSwapchainsKHR", @@ -5455,7 +5455,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD VkDisplayPropertiesKHR *pProperties) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::display_enabled, @@ -5476,7 +5476,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhys VkDisplayPlanePropertiesKHR *pProperties) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::display_enabled, @@ -5497,7 +5497,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDev uint32_t *pDisplayCount, VkDisplayKHR *pDisplays) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::display_enabled, @@ -5518,7 +5518,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice phys uint32_t *pPropertyCount, VkDisplayModePropertiesKHR *pProperties) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::display_enabled, @@ -5540,7 +5540,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayModeKHR(VkPhysicalDevice physicalDev const VkAllocationCallbacks *pAllocator, VkDisplayModeKHR *pMode) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::display_enabled, "vkCreateDisplayModeKHR", @@ -5561,7 +5561,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice p uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR *pCapabilities) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::display_enabled, @@ -5582,7 +5582,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(instance, &instance_extension_enables::display_enabled, "vkCreateDisplayPlaneSurfaceKHR", @@ -5603,7 +5603,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance instance, VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR *pFeatures) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::khr_get_phys_dev_properties2_enabled, @@ -5619,7 +5619,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physic VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR *pProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::khr_get_phys_dev_properties2_enabled, @@ -5635,7 +5635,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR(VkPhysicalDevice phys VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR *pFormatProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::khr_get_phys_dev_properties2_enabled, @@ -5654,7 +5654,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2KHR( VkImageFormatProperties2KHR *pImageFormatProperties) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::khr_get_phys_dev_properties2_enabled, @@ -5677,7 +5677,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysical uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR *pQueueFamilyProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::khr_get_phys_dev_properties2_enabled, @@ -5696,7 +5696,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysical VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::khr_get_phys_dev_properties2_enabled, @@ -5714,7 +5714,7 @@ static bool PostGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevic const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2KHR *pProperties) { - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); if (pProperties != nullptr) { for (uint32_t i = 0; i < *pPropertyCount; ++i) { if ((pProperties[i].properties.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | @@ -5736,7 +5736,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2KHR *pProperties) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::khr_get_phys_dev_properties2_enabled, @@ -5757,7 +5757,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags) { bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip_call |= require_device_extension(my_data, my_data->enables.khr_maintenance1, "vkTrimCommandPoolKHR", @@ -5775,7 +5775,7 @@ VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR(VkDevice device, VkCommandPool com #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display *dpy, VkDisplayKHR display) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; skip |= require_instance_extension(physicalDevice, &instance_extension_enables::ext_acquire_xlib_display_enabled, @@ -5791,7 +5791,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT(VkPhysicalDevice physicalDe VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display *dpy, RROutput rrOutput, VkDisplayKHR *pDisplay) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; skip |= require_instance_extension(physicalDevice, &instance_extension_enables::ext_acquire_xlib_display_enabled, @@ -5810,7 +5810,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT(VkPhysicalDevice physica VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, VkDebugMarkerObjectTagInfoEXT *pTagInfo) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.ext_debug_marker, "vkDebugMarkerSetObjectTagEXT", @@ -5833,7 +5833,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, VkDeb VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, VkDebugMarkerObjectNameInfoEXT *pNameInfo) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.ext_debug_marker, "vkDebugMarkerSetObjectNameEXT", @@ -5855,7 +5855,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, VkDe VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT *pMarkerInfo) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.ext_debug_marker, "vkCmdDebugMarkerBeginEXT", @@ -5870,7 +5870,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT *pMarkerInfo) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.ext_debug_marker, "vkCmdDebugMarkerInsertEXT", @@ -5887,7 +5887,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; skip |= require_instance_extension(physicalDevice, &instance_extension_enables::ext_direct_mode_display_enabled, @@ -5907,7 +5907,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT(VkPhysicalDevice physicalDevice VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT *pSurfaceCapabilities) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); bool skip = false; skip |= require_instance_extension(physicalDevice, &instance_extension_enables::ext_display_surface_counter_enabled, @@ -5928,7 +5928,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( VkExternalImageFormatPropertiesNV *pExternalImageFormatProperties) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= require_instance_extension(physicalDevice, &instance_extension_enables::nv_external_memory_capabilities_enabled, @@ -5955,7 +5955,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV(VkDevice device, VkDeviceM VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE *pHandle) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nv_external_memory_win32, "vkGetMemoryWin32HandleNV", @@ -5976,7 +5976,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV(VkDevice device, VkDeviceM VKAPI_ATTR void VKAPI_CALL CmdProcessCommandsNVX(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX *pProcessCommandsInfo) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkCmdProcessCommandsNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -5989,7 +5989,7 @@ VKAPI_ATTR void VKAPI_CALL CmdProcessCommandsNVX(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdReserveSpaceForCommandsNVX(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX *pReserveSpaceInfo) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkCmdReserveSpaceForCommandsNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -6005,7 +6005,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutNVX *pIndirectCommandsLayout) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkCreateIndirectCommandsLayoutNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -6021,7 +6021,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNVX(VkDevice device, VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkDestroyIndirectCommandsLayoutNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -6037,7 +6037,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateObjectTableNVX(VkDevice device, const VkObj const VkAllocationCallbacks *pAllocator, VkObjectTableNVX *pObjectTable) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkCreateObjectTableNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -6052,7 +6052,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateObjectTableNVX(VkDevice device, const VkObj VKAPI_ATTR void VKAPI_CALL DestroyObjectTableNVX(VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks *pAllocator) { bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkDestroyObjectTableNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -6069,7 +6069,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterObjectsNVX(VkDevice device, VkObjectTable const uint32_t *pObjectIndices) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkRegisterObjectsNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -6086,7 +6086,7 @@ VKAPI_ATTR VkResult VKAPI_CALL UnregisterObjectsNVX(VkDevice device, VkObjectTab const VkObjectEntryTypeNVX *pObjectEntryTypes, const uint32_t *pObjectIndices) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; bool skip = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); assert(my_data != NULL); skip |= require_device_extension(my_data, my_data->enables.nvx_device_generated_commands, "vkUnregisterObjectsNVX", VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME); @@ -6103,7 +6103,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhy VkDeviceGeneratedCommandsFeaturesNVX *pFeatures, VkDeviceGeneratedCommandsLimitsNVX *pLimits) { bool skip = false; - auto my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), instance_layer_data_map); + auto my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); assert(my_data != NULL); skip |= parameter_validation_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(my_data->report_data, pFeatures, pLimits); if (!skip) { @@ -6126,7 +6126,7 @@ static PFN_vkVoidFunction intercept_extension_device_command(const char *name, V VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char *funcName) { assert(device); - layer_data *data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (validate_string(data->report_data, "vkGetDeviceProcAddr", "funcName", funcName)) { return NULL; @@ -6155,7 +6155,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance assert(instance); - auto data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); proc = debug_report_get_instance_proc_addr(data->report_data, funcName); if (!proc) proc = InterceptWsiEnabledCommand(funcName, instance); @@ -6170,7 +6170,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { assert(instance); - auto data = get_my_data_ptr(get_dispatch_key(instance), instance_layer_data_map); + auto data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); if (!data->dispatch_table.GetPhysicalDeviceProcAddr) return nullptr; return data->dispatch_table.GetPhysicalDeviceProcAddr(instance, funcName); diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index cd7f601..112a333 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -48,8 +48,8 @@ static const VkLayerProperties swapchain_layer = { }; static void checkDeviceRegisterExtensions(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, VkDevice device) { - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); - layer_data *my_instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + layer_data *my_instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -71,7 +71,7 @@ static void checkDeviceRegisterExtensions(VkPhysicalDevice physicalDevice, const static void checkInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateInfo, VkInstance instance) { uint32_t i; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); // Remember this instance, and whether the VK_KHR_surface extension // was enabled for it: @@ -157,7 +157,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat return result; } - layer_data *my_data = get_my_data_ptr(get_dispatch_key(*pInstance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(*pInstance), layer_data_map); my_data->instance = *pInstance; my_data->instance_dispatch_table = new VkLayerInstanceDispatchTable; layer_init_instance_dispatch_table(*pInstance, my_data->instance_dispatch_table, fpGetInstanceProcAddr); @@ -173,7 +173,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(instance); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); SwpInstance *pInstance = NULL; { auto it = my_data->instanceMap.find(instance); @@ -252,7 +252,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); // Call down the call chain: my_data->instance_dispatch_table->GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, @@ -281,7 +281,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR(VkInstance instance, cons const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpInstance *pInstance = NULL; { @@ -323,7 +323,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMirSurfaceKHR(VkInstance instance, const Vk const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpInstance *pInstance = NULL; { @@ -363,7 +363,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceMirPresentationSupportKHR(VkPhys uint32_t queueFamilyIndex, MirConnection *connection) { VkBool32 result = VK_FALSE; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -392,7 +392,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR(VkInstance instance, cons const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpInstance *pInstance = NULL; { @@ -433,7 +433,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR(Vk struct wl_display *display) { VkBool32 result = VK_FALSE; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -462,7 +462,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR(VkInstance instance, const const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpInstance *pInstance = NULL; { @@ -502,7 +502,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR(VkPh uint32_t queueFamilyIndex) { VkBool32 result = VK_FALSE; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -530,7 +530,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR(VkInstance instance, const Vk const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpInstance *pInstance = NULL; { @@ -571,7 +571,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR(VkPhys xcb_visualid_t visual_id) { VkBool32 result = VK_FALSE; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -600,7 +600,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR(VkInstance instance, const V const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpInstance *pInstance = NULL; { @@ -641,7 +641,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR(VkPhy VisualID visualID) { VkBool32 result = VK_FALSE; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -669,7 +669,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhys VkDisplayPlanePropertiesKHR *pProperties) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -699,7 +699,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDev uint32_t *pDisplayCount, VkDisplayKHR *pDisplays) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -740,7 +740,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice p uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR *pCapabilities) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -779,7 +779,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpInstance *pInstance = &(my_data->instanceMap[instance]); @@ -809,7 +809,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance instance, VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) { bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); std::unique_lock lock(global_lock); SwpSurface *pSurface = NULL; { @@ -855,7 +855,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR s VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) { VkResult result = VK_SUCCESS; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); // Call down the call chain: result = my_data->instance_dispatch_table->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); @@ -884,7 +884,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { - layer_data *my_instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); VkLayerDeviceCreateInfo *chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); assert(chain_info->u.pLayerInfo); @@ -904,7 +904,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con } std::lock_guard lock(global_lock); - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); // Setup device dispatch table my_device_data->device_dispatch_table = new VkLayerDispatchTable; @@ -918,7 +918,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(device); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); // Call down the call chain: my_data->device_dispatch_table->DestroyDevice(device, pAllocator); @@ -964,7 +964,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevi VkSurfaceKHR surface, VkBool32 *pSupported) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); std::unique_lock lock(global_lock); SwpPhysicalDevice *pPhysicalDevice = NULL; { @@ -1031,7 +1031,7 @@ static bool validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateI // TODO: Validate cases of re-creating a swapchain (the current code // assumes a new swapchain is being created). bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); SwpDevice *pDevice = NULL; { auto it = my_data->deviceMap.find(device); @@ -1090,7 +1090,7 @@ static bool validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateI VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) { VkResult result = VK_SUCCESS; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); bool skip_call = validateCreateSwapchainKHR(device, pCreateInfo, pSwapchain); lock.unlock(); @@ -1118,7 +1118,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc SwpPhysicalDevice *pPhysicalDevice = pDevice->pPhysicalDevice; SwpInstance *pInstance = (pPhysicalDevice) ? pPhysicalDevice->pInstance : NULL; layer_data *my_instance_data = - ((pInstance) ? get_my_data_ptr(get_dispatch_key(pInstance->instance), layer_data_map) : NULL); + ((pInstance) ? GetLayerDataPtr(get_dispatch_key(pInstance->instance), layer_data_map) : NULL); SwpSurface *pSurface = ((my_data && pCreateInfo) ? &my_instance_data->surfaceMap[pCreateInfo->surface] : NULL); my_data->swapchainMap[*pSwapchain].pSurface = pSurface; if (pSurface) { @@ -1139,7 +1139,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR s // presentable images acquired from pname:swapchain must: have completed // execution bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); // Regardless of skip_call value, do some internal cleanup: @@ -1170,7 +1170,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai VkImage *pSwapchainImages) { VkResult result = VK_SUCCESS; bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); SwpSwapchain *pSwapchain = NULL; @@ -1225,7 +1225,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) { bool skip_call = false; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (!skip_call) { // Call down the call chain: @@ -1251,7 +1251,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pMsgCallback) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkResult result = my_data->instance_dispatch_table->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pMsgCallback); if (VK_SUCCESS == result) { @@ -1263,7 +1263,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT msgCallback, const VkAllocationCallbacks *pAllocator) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); my_data->instance_dispatch_table->DestroyDebugReportCallbackEXT(instance, msgCallback, pAllocator); std::lock_guard lock(global_lock); layer_destroy_msg_callback(my_data->report_data, msgCallback, pAllocator); @@ -1272,7 +1272,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); my_data->instance_dispatch_table->DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); } @@ -1302,7 +1302,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi assert(physicalDevice); dispatch_key key = get_dispatch_key(physicalDevice); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); return my_data->instance_dispatch_table->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } @@ -1322,7 +1322,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, cons layer_data *my_data; - my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkLayerDispatchTable *pDisp = my_data->device_dispatch_table; proc = intercept_khr_swapchain_command(funcName, device); @@ -1341,7 +1341,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance assert(instance); layer_data *my_data; - my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; proc = debug_report_get_instance_proc_addr(my_data->report_data, funcName); @@ -1356,7 +1356,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance in assert(instance); layer_data *my_data; - my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; if (pTable->GetPhysicalDeviceProcAddr == NULL) return NULL; diff --git a/layers/threading.cpp b/layers/threading.cpp index 0c6e3f1..927aac3 100644 --- a/layers/threading.cpp +++ b/layers/threading.cpp @@ -62,7 +62,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); if (result != VK_SUCCESS) return result; - layer_data *my_data = get_my_data_ptr(get_dispatch_key(*pInstance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(*pInstance), layer_data_map); my_data->instance = *pInstance; my_data->instance_dispatch_table = new VkLayerInstanceDispatchTable; layer_init_instance_dispatch_table(*pInstance, my_data->instance_dispatch_table, fpGetInstanceProcAddr); @@ -80,7 +80,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(instance); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; // Enable the temporary callback(s) here to catch cleanup issues: @@ -126,7 +126,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { - layer_data *my_instance_data = get_my_data_ptr(get_dispatch_key(gpu), layer_data_map); + layer_data *my_instance_data = GetLayerDataPtr(get_dispatch_key(gpu), layer_data_map); VkLayerDeviceCreateInfo *chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); assert(chain_info->u.pLayerInfo); @@ -145,7 +145,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice return result; } - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); // Setup device dispatch table my_device_data->device_dispatch_table = new VkLayerDispatchTable; @@ -157,7 +157,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(device); - layer_data *dev_data = get_my_data_ptr(key, layer_data_map); + layer_data *dev_data = GetLayerDataPtr(key, layer_data_map); bool threadChecks = startMultiThread(); if (threadChecks) { startWriteObject(dev_data, device); @@ -213,7 +213,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi assert(physicalDevice); dispatch_key key = get_dispatch_key(physicalDevice); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); return my_data->instance_dispatch_table->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } @@ -246,7 +246,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, cons addr = layer_intercept_proc(funcName); if (addr) return addr; - dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkLayerDispatchTable *pTable = dev_data->device_dispatch_table; if (pTable->GetDeviceProcAddr == NULL) return NULL; @@ -265,7 +265,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance assert(instance); - my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); addr = debug_report_get_instance_proc_addr(my_data->report_data, funcName); if (addr) { return addr; @@ -282,7 +282,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance in assert(instance); layer_data *my_data; - my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; if (pTable->GetPhysicalDeviceProcAddr == NULL) return NULL; @@ -293,7 +293,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pMsgCallback) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); bool threadChecks = startMultiThread(); if (threadChecks) { startReadObject(my_data, instance); @@ -313,7 +313,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator) { - layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *my_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); bool threadChecks = startMultiThread(); if (threadChecks) { startReadObject(my_data, instance); @@ -332,7 +332,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) { dispatch_key key = get_dispatch_key(device); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); VkLayerDispatchTable *pTable = my_data->device_dispatch_table; VkResult result; bool threadChecks = startMultiThread(); @@ -363,7 +363,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkC VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) { dispatch_key key = get_dispatch_key(device); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); VkLayerDispatchTable *pTable = my_data->device_dispatch_table; const bool lockCommandPool = false; // pool is already directly locked bool threadChecks = startMultiThread(); diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp index dfd35f2..560daff 100644 --- a/layers/unique_objects.cpp +++ b/layers/unique_objects.cpp @@ -60,7 +60,7 @@ static void initUniqueObjects(layer_data *instance_data, const VkAllocationCallb // Handle CreateInstance Extensions static void checkInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateInfo, VkInstance instance) { uint32_t i; - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *disp_table = instance_data->instance_dispatch_table; instance_ext_map[disp_table] = {}; @@ -115,7 +115,7 @@ static void checkInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateI // Handle CreateDevice Extensions static void createDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo, VkDevice device) { - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkLayerDispatchTable *disp_table = device_data->device_dispatch_table; PFN_vkGetDeviceProcAddr gpa = disp_table->GetDeviceProcAddr; @@ -160,7 +160,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat return result; } - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(*pInstance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(*pInstance), layer_data_map); instance_data->instance = *pInstance; instance_data->instance_dispatch_table = new VkLayerInstanceDispatchTable; layer_init_instance_dispatch_table(*pInstance, instance_data->instance_dispatch_table, fpGetInstanceProcAddr); @@ -197,7 +197,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(instance); - layer_data *instance_data = get_my_data_ptr(key, layer_data_map); + layer_data *instance_data = GetLayerDataPtr(key, layer_data_map); VkLayerInstanceDispatchTable *disp_table = instance_data->instance_dispatch_table; instance_ext_map.erase(disp_table); disp_table->DestroyInstance(instance, pAllocator); @@ -215,7 +215,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { - layer_data *my_instance_data = get_my_data_ptr(get_dispatch_key(gpu), layer_data_map); + layer_data *my_instance_data = GetLayerDataPtr(get_dispatch_key(gpu), layer_data_map); VkLayerDeviceCreateInfo *chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); assert(chain_info->u.pLayerInfo); @@ -234,7 +234,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice return result; } - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); my_device_data->report_data = layer_debug_report_create_device(my_instance_data->report_data, *pDevice); // Setup layer's device dispatch table @@ -251,7 +251,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { dispatch_key key = get_dispatch_key(device); - layer_data *dev_data = get_my_data_ptr(key, layer_data_map); + layer_data *dev_data = GetLayerDataPtr(key, layer_data_map); layer_debug_report_destroy_device(device); dev_data->device_dispatch_table->DestroyDevice(device, pAllocator); @@ -301,7 +301,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi assert(physicalDevice); dispatch_key key = get_dispatch_key(physicalDevice); - layer_data *instance_data = get_my_data_ptr(key, layer_data_map); + layer_data *instance_data = GetLayerDataPtr(key, layer_data_map); return instance_data->instance_dispatch_table->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } @@ -313,7 +313,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, cons return addr; } - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkLayerDispatchTable *disp_table = dev_data->device_dispatch_table; if (disp_table->GetDeviceProcAddr == NULL) { return NULL; @@ -330,7 +330,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance } assert(instance); - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); addr = debug_report_get_instance_proc_addr(instance_data->report_data, funcName); if (addr) { return addr; @@ -346,7 +346,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { assert(instance); - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *disp_table = instance_data->instance_dispatch_table; if (disp_table->GetPhysicalDeviceProcAddr == NULL) { return NULL; @@ -359,7 +359,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAll const VkMemoryAllocateInfo *input_allocate_info = pAllocateInfo; std::unique_ptr safe_allocate_info; std::unique_ptr safe_dedicated_allocate_info; - layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if ((pAllocateInfo != nullptr) && ContainsExtStruct(pAllocateInfo, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV)) { @@ -416,7 +416,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAll VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); safe_VkComputePipelineCreateInfo *local_pCreateInfos = NULL; if (pCreateInfos) { std::lock_guard lock(global_lock); @@ -465,7 +465,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); safe_VkGraphicsPipelineCreateInfo *local_pCreateInfos = NULL; if (pCreateInfos) { local_pCreateInfos = new safe_VkGraphicsPipelineCreateInfo[createInfoCount]; @@ -524,7 +524,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pMsgCallback) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); VkResult result = instance_data->instance_dispatch_table->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pMsgCallback); @@ -536,7 +536,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); instance_data->instance_dispatch_table->DestroyDebugReportCallbackEXT(instance, callback, pAllocator); layer_destroy_msg_callback(instance_data->report_data, callback, pAllocator); } @@ -544,14 +544,14 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg) { - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), layer_data_map); instance_data->instance_dispatch_table->DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); } VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) { - layer_data *my_map_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); safe_VkSwapchainCreateInfoKHR *local_pCreateInfo = NULL; if (pCreateInfo) { std::lock_guard lock(global_lock); @@ -559,7 +559,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc local_pCreateInfo->oldSwapchain = (VkSwapchainKHR)my_map_data->unique_id_mapping[reinterpret_cast(pCreateInfo->oldSwapchain)]; // Need to pull surface mapping from the instance-level map - layer_data *instance_data = get_my_data_ptr(get_dispatch_key(my_map_data->gpu), layer_data_map); + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(my_map_data->gpu), layer_data_map); local_pCreateInfo->surface = (VkSurfaceKHR)instance_data->unique_id_mapping[reinterpret_cast(pCreateInfo->surface)]; } @@ -580,7 +580,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages) { - layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (VK_NULL_HANDLE != swapchain) { std::lock_guard lock(global_lock); swapchain = (VkSwapchainKHR)my_device_data->unique_id_mapping[reinterpret_cast(swapchain)]; @@ -605,7 +605,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai #ifndef __ANDROID__ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkDisplayPropertiesKHR *pProperties) { - layer_data *my_map_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); safe_VkDisplayPropertiesKHR *local_pProperties = NULL; { std::lock_guard lock(global_lock); @@ -646,7 +646,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t *pDisplayCount, VkDisplayKHR *pDisplays) { - layer_data *my_map_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); VkResult result = my_map_data->instance_dispatch_table->GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); if (VK_SUCCESS == result) { @@ -664,7 +664,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDev VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t *pPropertyCount, VkDisplayModePropertiesKHR *pProperties) { - layer_data *my_map_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); VkDisplayModePropertiesKHR *local_pProperties = NULL; { std::lock_guard lock(global_lock); @@ -696,7 +696,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice phys VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR *pCapabilities) { - layer_data *dev_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); { std::lock_guard lock(global_lock); auto it = dev_data->unique_id_mapping.find(reinterpret_cast(mode)); diff --git a/layers/vk_layer_data.h b/layers/vk_layer_data.h index eb2b8b4..84bbad2 100644 --- a/layers/vk_layer_data.h +++ b/layers/vk_layer_data.h @@ -1,6 +1,6 @@ -/* Copyright (c) 2015-2016 The Khronos Group Inc. - * Copyright (c) 2015-2016 Valve Corporation - * Copyright (c) 2015-2016 LunarG, Inc. +/* Copyright (c) 2015-2017 The Khronos Group Inc. + * Copyright (c) 2015-2017 Valve Corporation + * Copyright (c) 2015-2017 LunarG, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Author: Tobin Ehlis + * Author: Tobin Ehlis */ #ifndef LAYER_DATA_H @@ -23,8 +23,9 @@ #include #include "vk_layer_table.h" +// For the given data key, look up the layer_data instance from given layer_data_map template -DATA_T *get_my_data_ptr(void *data_key, std::unordered_map &layer_data_map) { +DATA_T *GetLayerDataPtr(void *data_key, std::unordered_map &layer_data_map) { DATA_T *debug_data; typename std::unordered_map::const_iterator got; diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index b033d1f..58947d5 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -42,7 +42,7 @@ typedef struct _debug_report_data { bool g_DEBUG_REPORT; } debug_report_data; -template debug_report_data *get_my_data_ptr(void *data_key, +template debug_report_data *GetLayerDataPtr(void *data_key, std::unordered_map &data_map); // Forward Declarations diff --git a/scripts/threading_generator.py b/scripts/threading_generator.py index 05e659f..3ce26d2 100644 --- a/scripts/threading_generator.py +++ b/scripts/threading_generator.py @@ -432,7 +432,7 @@ class ThreadOutputGenerator(OutputGenerator): dispatchable_type = cmdinfo.elem.find('param/type').text dispatchable_name = cmdinfo.elem.find('param/name').text self.appendSection('command', ' dispatch_key key = get_dispatch_key('+dispatchable_name+');') - self.appendSection('command', ' layer_data *my_data = get_my_data_ptr(key, layer_data_map);') + self.appendSection('command', ' layer_data *my_data = GetLayerDataPtr(key, layer_data_map);') if dispatchable_type in ["VkPhysicalDevice", "VkInstance"]: self.appendSection('command', ' VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table;') else: diff --git a/scripts/unique_objects_generator.py b/scripts/unique_objects_generator.py index 6663df0..bba7cfd 100644 --- a/scripts/unique_objects_generator.py +++ b/scripts/unique_objects_generator.py @@ -717,7 +717,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): dispatchable_type = cmdinfo.elem.find('param/type').text dispatchable_name = cmdinfo.elem.find('param/name').text # Generate local instance/pdev/device data lookup - self.appendSection('command', ' layer_data *dev_data = get_my_data_ptr(get_dispatch_key('+dispatchable_name+'), layer_data_map);') + self.appendSection('command', ' layer_data *dev_data = GetLayerDataPtr(get_dispatch_key('+dispatchable_name+'), layer_data_map);') # Handle return values, if any resulttype = cmdinfo.elem.find('proto/type') if (resulttype != None and resulttype.text == 'void'):