Store physical device features in example base class

This commit is contained in:
saschawillems 2016-04-24 10:28:27 +02:00
parent 568161362c
commit 561cb78720
2 changed files with 5 additions and 0 deletions

View file

@ -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);

View file

@ -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)