From 3f9bf917c2d17283b7c8d5f010627faec4f4515d Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 3 Oct 2016 17:44:52 +1300 Subject: [PATCH] layers: Store ptr from device data to instance data Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 297aad5..d810f76 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -140,6 +140,8 @@ struct layer_data { unordered_map> shaderModuleMap; VkDevice device = VK_NULL_HANDLE; + layer_data *instance_data = nullptr; // from device to enclosing instance + VkPhysicalDeviceFeatures enabled_features = {}; // Device specific data PHYS_DEV_PROPERTIES_NODE phys_dev_properties = {}; @@ -4472,6 +4474,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice // Copy instance state into this device's layer_data struct my_device_data->instance_state = unique_ptr(new INSTANCE_STATE(*(my_instance_data->instance_state))); + my_device_data->instance_data = my_instance_data; // Setup device dispatch table my_device_data->device_dispatch_table = new VkLayerDispatchTable; layer_init_device_dispatch_table(*pDevice, my_device_data->device_dispatch_table, fpGetDeviceProcAddr); -- 2.7.4