From a02bd090ecc3a36283c615420fc2e63691253f95 Mon Sep 17 00:00:00 2001 From: Cort Stratton Date: Fri, 4 May 2018 14:35:18 -0400 Subject: layers: Add GetApiVersion() helper --- layers/core_validation.cpp | 2 ++ layers/core_validation_types.h | 1 + 2 files changed, 3 insertions(+) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 6654045a..bb463c40 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -4753,6 +4753,8 @@ const VkPhysicalDeviceDescriptorIndexingFeaturesEXT *GetEnabledDescriptorIndexin const DeviceExtensions *GetDeviceExtensions(const layer_data *device_data) { return &device_data->extensions; } +uint32_t GetApiVersion(const layer_data *device_data) { return device_data->api_version; } + VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage) { VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index 58231daf..f31cae0d 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -947,6 +947,7 @@ std::unordered_map> *GetBufferMap(layer_ std::unordered_map> *GetBufferViewMap(layer_data *device_data); std::unordered_map> *GetImageViewMap(layer_data *device_data); const DeviceExtensions *GetDeviceExtensions(const layer_data *); +uint32_t GetApiVersion(const layer_data *); } // namespace core_validation #endif // CORE_VALIDATION_TYPES_H_ -- cgit v1.2.3