Store physical device features in example base class
This commit is contained in:
parent
568161362c
commit
561cb78720
2 changed files with 5 additions and 0 deletions
|
|
@ -768,7 +768,10 @@ void VulkanExampleBase::initVulkan(bool enableValidation)
|
||||||
err = createDevice(queueCreateInfo, enableValidation);
|
err = createDevice(queueCreateInfo, enableValidation);
|
||||||
assert(!err);
|
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);
|
vkGetPhysicalDeviceProperties(physicalDevice, &deviceProperties);
|
||||||
|
vkGetPhysicalDeviceFeatures(physicalDevice, &deviceFeatures);
|
||||||
|
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
LOGD(deviceProperties.deviceName);
|
LOGD(deviceProperties.deviceName);
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,8 @@ protected:
|
||||||
VkPhysicalDevice physicalDevice;
|
VkPhysicalDevice physicalDevice;
|
||||||
// Stores physical device properties (for e.g. checking device limits)
|
// Stores physical device properties (for e.g. checking device limits)
|
||||||
VkPhysicalDeviceProperties deviceProperties;
|
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
|
// Stores all available memory (type) properties for the physical device
|
||||||
VkPhysicalDeviceMemoryProperties deviceMemoryProperties;
|
VkPhysicalDeviceMemoryProperties deviceMemoryProperties;
|
||||||
// Logical device, application's view of the physical device (GPU)
|
// Logical device, application's view of the physical device (GPU)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue