From 8c8cd92b22ec2f608365cc3b47328906aa52a02b Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Wed, 16 Nov 2016 12:12:56 -0700 Subject: layers: Save PDev in device's layer data Needed for physical-device calls or to access data belonging to the physical device. Change-Id: I2a1f6eadcaf82c2247a68c91c39d97ef3284b22a --- layers/core_validation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 51397cab..5e85df49 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -165,6 +165,7 @@ struct layer_data { unordered_map> renderPassMap; unordered_map> shaderModuleMap; VkDevice device = VK_NULL_HANDLE; + VkPhysicalDevice physical_device = VK_NULL_HANDLE; instance_layer_data *instance_data = nullptr; // from device to enclosing instance @@ -4454,6 +4455,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice // Setup device dispatch table layer_init_device_dispatch_table(*pDevice, &my_device_data->dispatch_table, fpGetDeviceProcAddr); my_device_data->device = *pDevice; + // Save PhysicalDevice handle + my_device_data->physical_device = gpu; my_device_data->report_data = layer_debug_report_create_device(my_instance_data->report_data, *pDevice); checkDeviceRegisterExtensions(pCreateInfo, *pDevice); -- cgit v1.2.3