From c5f1b4763bf11a84e78746cfb090a9cd089288e4 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Fri, 11 May 2018 07:39:16 -0600 Subject: layers:Store GPDF2 struct In PHYSICAL_DEVICE_STATE track safe_VkPhysicalDeviceFeatures2 instead of the old VkPhysicalDeviceFeatures. Initially just passing the VkPhysicalDeviceFeatures of VkPhysicalDeviceFeatures2 wherever this was used. This is laying groundwork to start using/comparing extended features in core validation. --- layers/core_validation.cpp | 6 +++--- layers/core_validation.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index bb463c40..5de8fe9c 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2175,7 +2175,7 @@ static bool ValidateRequestedFeatures(instance_layer_data *instance_data, const const VkPhysicalDeviceFeatures *requested_features) { bool skip = false; - const VkBool32 *actual = reinterpret_cast(&pd_state->features); + const VkBool32 *actual = reinterpret_cast(&pd_state->features2.features.robustBufferAccess); const VkBool32 *requested = reinterpret_cast(requested_features); // TODO : This is a nice, compact way to loop through struct, but a bad way to report issues // Need to provide the struct member name with the issue. To do that seems like we'll @@ -11283,7 +11283,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin auto &phys_device_state = instance_data->physical_device_map[pPhysicalDevices[i]]; phys_device_state.phys_device = pPhysicalDevices[i]; // Init actual features for each physical device - instance_data->dispatch_table.GetPhysicalDeviceFeatures(pPhysicalDevices[i], &phys_device_state.features); + instance_data->dispatch_table.GetPhysicalDeviceFeatures(pPhysicalDevices[i], &phys_device_state.features2.features); } } return result; @@ -12121,7 +12121,7 @@ static void PostCallRecordEnumeratePhysicalDeviceGroups(instance_layer_data *ins auto &phys_device_state = instance_data->physical_device_map[cur_phys_dev]; phys_device_state.phys_device = cur_phys_dev; // Init actual features for each physical device - instance_data->dispatch_table.GetPhysicalDeviceFeatures(cur_phys_dev, &phys_device_state.features); + instance_data->dispatch_table.GetPhysicalDeviceFeatures(cur_phys_dev, &phys_device_state.features2.features); } } } diff --git a/layers/core_validation.h b/layers/core_validation.h index 79330d5f..fbd055c1 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -128,7 +128,7 @@ struct PHYSICAL_DEVICE_STATE { CALL_STATE vkGetPhysicalDeviceSurfacePresentModesKHRState = UNCALLED; CALL_STATE vkGetPhysicalDeviceSurfaceFormatsKHRState = UNCALLED; CALL_STATE vkGetPhysicalDeviceDisplayPlanePropertiesKHRState = UNCALLED; - VkPhysicalDeviceFeatures features = {}; + safe_VkPhysicalDeviceFeatures2 features2 = {}; VkPhysicalDevice phys_device = VK_NULL_HANDLE; uint32_t queue_family_count = 0; std::vector queue_family_properties; -- cgit v1.2.3