diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index b76db783..4562f38e 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -768,7 +768,10 @@ void VulkanExampleBase::initVulkan(bool enableValidation) err = createDevice(queueCreateInfo, enableValidation); assert(!err); + // Store properties (including limits) and features of the phyiscal device + // So examples can check against them and see if a feature is actually supported vkGetPhysicalDeviceProperties(physicalDevice, &deviceProperties); + vkGetPhysicalDeviceFeatures(physicalDevice, &deviceFeatures); #if defined(__ANDROID__) LOGD(deviceProperties.deviceName); diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index c2f13210..ac9c984b 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -69,6 +69,8 @@ protected: VkPhysicalDevice physicalDevice; // Stores physical device properties (for e.g. checking device limits) VkPhysicalDeviceProperties deviceProperties; + // Stores phyiscal device features (for e.g. checking if a feature is available) + VkPhysicalDeviceFeatures deviceFeatures; // Stores all available memory (type) properties for the physical device VkPhysicalDeviceMemoryProperties deviceMemoryProperties; // Logical device, application's view of the physical device (GPU)