diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-11-16 12:12:56 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-11-16 13:01:55 -0700 |
| commit | 8c8cd92b22ec2f608365cc3b47328906aa52a02b (patch) | |
| tree | d95541638649b4440c8c43bc6c9dcb64af865d9c /layers/core_validation.cpp | |
| parent | b98f7913a2dd33d692a66a8227f6046f3be59c3c (diff) | |
| download | usermoji-8c8cd92b22ec2f608365cc3b47328906aa52a02b.tar.xz | |
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
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<VkRenderPass, unique_ptr<RENDER_PASS_STATE>> renderPassMap; unordered_map<VkShaderModule, unique_ptr<shader_module>> 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); |
