diff options
Diffstat (limited to 'layers/unique_objects.cpp')
| -rw-r--r-- | layers/unique_objects.cpp | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp index 699f8ee9..18786f4c 100644 --- a/layers/unique_objects.cpp +++ b/layers/unique_objects.cpp @@ -71,8 +71,8 @@ static void InstanceExtensionWhitelist(const VkInstanceCreateInfo *pCreateInfo, if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kInstanceExtensionNames)) { log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_UNDEFINED, "UniqueObjects", - "Instance Extension %s is not supported by this layer. Using this extension may adversely affect " - "validation results and/or produce undefined behavior.", + "Instance Extension %s is not supported by this layer. Using this extension may adversely affect validation " + "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); } } @@ -87,8 +87,8 @@ static void DeviceExtensionWhitelist(const VkDeviceCreateInfo *pCreateInfo, VkDe if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kDeviceExtensionNames)) { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_UNDEFINED, "UniqueObjects", - "Device Extension %s is not supported by this layer. Using this extension may adversely affect " - "validation results and/or produce undefined behavior.", + "Device Extension %s is not supported by this layer. Using this extension may adversely affect validation " + "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); } } @@ -118,9 +118,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat layer_init_instance_dispatch_table(*pInstance, &instance_data->dispatch_table, fpGetInstanceProcAddr); instance_data->instance = *pInstance; - instance_data->report_data = - debug_report_create_instance(&instance_data->dispatch_table, *pInstance, pCreateInfo->enabledExtensionCount, - pCreateInfo->ppEnabledExtensionNames); + instance_data->report_data = debug_report_create_instance( + &instance_data->dispatch_table, *pInstance, pCreateInfo->enabledExtensionCount, pCreateInfo->ppEnabledExtensionNames); // Set up temporary debug callbacks to output messages at CreateInstance-time if (!layer_copy_tmp_callbacks(pCreateInfo->pNext, &instance_data->num_tmp_callbacks, &instance_data->tmp_dbg_create_infos, @@ -270,7 +269,6 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance return table.GetInstanceProcAddr(instance, funcName); } - VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); VkLayerInstanceDispatchTable *disp_table = &instance_data->dispatch_table; @@ -306,8 +304,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin pipelineCache = Unwrap(device_data, pipelineCache); } - VkResult result = device_data->dispatch_table.CreateComputePipelines( - device, pipelineCache, createInfoCount, local_pCreateInfos->ptr(), pAllocator, pPipelines); + VkResult result = device_data->dispatch_table.CreateComputePipelines(device, pipelineCache, createInfoCount, + local_pCreateInfos->ptr(), pAllocator, pPipelines); delete[] local_pCreateInfos; { std::lock_guard<std::mutex> lock(global_lock); @@ -354,7 +352,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli if (pCreateInfos[idx0].pStages) { for (uint32_t idx1 = 0; idx1 < pCreateInfos[idx0].stageCount; ++idx1) { if (pCreateInfos[idx0].pStages[idx1].module) { - local_pCreateInfos[idx0].pStages[idx1].module = Unwrap(device_data, pCreateInfos[idx0].pStages[idx1].module); + local_pCreateInfos[idx0].pStages[idx1].module = + Unwrap(device_data, pCreateInfos[idx0].pStages[idx1].module); } } } @@ -368,8 +367,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli pipelineCache = Unwrap(device_data, pipelineCache); } - VkResult result = device_data->dispatch_table.CreateGraphicsPipelines( - device, pipelineCache, createInfoCount, local_pCreateInfos->ptr(), pAllocator, pPipelines); + VkResult result = device_data->dispatch_table.CreateGraphicsPipelines(device, pipelineCache, createInfoCount, + local_pCreateInfos->ptr(), pAllocator, pPipelines); delete[] local_pCreateInfos; { std::lock_guard<std::mutex> lock(global_lock); @@ -443,8 +442,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc local_pCreateInfo->surface = Unwrap(my_map_data->instance_data, pCreateInfo->surface); } - VkResult result = my_map_data->dispatch_table.CreateSwapchainKHR( - device, local_pCreateInfo->ptr(), pAllocator, pSwapchain); + VkResult result = my_map_data->dispatch_table.CreateSwapchainKHR(device, local_pCreateInfo->ptr(), pAllocator, pSwapchain); if (local_pCreateInfo) { delete local_pCreateInfo; } @@ -476,8 +474,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32 } } } - VkResult result = dev_data->dispatch_table.CreateSharedSwapchainsKHR( - device, swapchainCount, local_pCreateInfos->ptr(), pAllocator, pSwapchains); + VkResult result = dev_data->dispatch_table.CreateSharedSwapchainsKHR(device, swapchainCount, local_pCreateInfos->ptr(), + pAllocator, pSwapchains); if (local_pCreateInfos) delete[] local_pCreateInfos; if (VK_SUCCESS == result) { std::lock_guard<std::mutex> lock(global_lock); @@ -560,8 +558,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR(VkDevice device } } } - VkResult result = dev_data->dispatch_table.CreateDescriptorUpdateTemplateKHR( - device, local_create_info->ptr(), pAllocator, pDescriptorUpdateTemplate); + VkResult result = dev_data->dispatch_table.CreateDescriptorUpdateTemplateKHR(device, local_create_info->ptr(), pAllocator, + pDescriptorUpdateTemplate); if (VK_SUCCESS == result) { std::lock_guard<std::mutex> lock(global_lock); *pDescriptorUpdateTemplate = WrapNew(dev_data, *pDescriptorUpdateTemplate); @@ -680,8 +678,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplateKHR(VkDevice device, V descriptorUpdateTemplate = (VkDescriptorUpdateTemplateKHR)dev_data->unique_id_mapping[template_handle]; unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); } - dev_data->dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, - unwrapped_buffer); + dev_data->dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, unwrapped_buffer); free(unwrapped_buffer); } @@ -698,7 +695,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer c unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); } dev_data->dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, - unwrapped_buffer); + unwrapped_buffer); free(unwrapped_buffer); } @@ -707,8 +704,8 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD VkDisplayPropertiesKHR *pProperties) { instance_layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); - VkResult result = my_map_data->dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR( - physicalDevice, pPropertyCount, pProperties); + VkResult result = + my_map_data->dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { std::lock_guard<std::mutex> lock(global_lock); for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { @@ -721,8 +718,8 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t *pDisplayCount, VkDisplayKHR *pDisplays) { instance_layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); - VkResult result = my_map_data->dispatch_table.GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, - pDisplayCount, pDisplays); + VkResult result = + my_map_data->dispatch_table.GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); if (VK_SUCCESS == result) { if ((*pDisplayCount > 0) && pDisplays) { std::lock_guard<std::mutex> lock(global_lock); @@ -745,8 +742,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice phys display = Unwrap(my_map_data, display); } - VkResult result = my_map_data->dispatch_table.GetDisplayModePropertiesKHR( - physicalDevice, display, pPropertyCount, pProperties); + VkResult result = my_map_data->dispatch_table.GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); if (result == VK_SUCCESS && pProperties) { std::lock_guard<std::mutex> lock(global_lock); for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { @@ -763,8 +759,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice p std::lock_guard<std::mutex> lock(global_lock); mode = Unwrap(dev_data, mode); } - VkResult result = - dev_data->dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); + VkResult result = dev_data->dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); return result; } #endif |
