SpiecsEngine
 
Loading...
Searching...
No Matches

◆ GetMaxUsableSampleCount()

VkSampleCountFlagBits Spices::VulkanDevice::GetMaxUsableSampleCount ( ) const

Get device's max usable sample count.

Returns
Returns device's max usable sample count.

Get VkPhysicalDeviceProperties.

@breif select one.

Get VkPhysicalDeviceProperties.

@breif select one.

Definition at line 269 of file VulkanDevice.cpp.

270 {
272
276 VkPhysicalDeviceProperties physicalDeviceProperties;
277 vkGetPhysicalDeviceProperties(m_VulkanState.m_PhysicalDevice, &physicalDeviceProperties);
278
279 const VkSampleCountFlags counts =
280 physicalDeviceProperties.limits.framebufferColorSampleCounts &
281 physicalDeviceProperties.limits.framebufferDepthSampleCounts;
282
286 if (counts & VK_SAMPLE_COUNT_64_BIT) { return VK_SAMPLE_COUNT_64_BIT; }
287 if (counts & VK_SAMPLE_COUNT_32_BIT) { return VK_SAMPLE_COUNT_32_BIT; }
288 if (counts & VK_SAMPLE_COUNT_16_BIT) { return VK_SAMPLE_COUNT_16_BIT; }
289 if (counts & VK_SAMPLE_COUNT_8_BIT) { return VK_SAMPLE_COUNT_8_BIT; }
290 if (counts & VK_SAMPLE_COUNT_4_BIT) { return VK_SAMPLE_COUNT_4_BIT; }
291 if (counts & VK_SAMPLE_COUNT_2_BIT) { return VK_SAMPLE_COUNT_2_BIT; }
292
293 return VK_SAMPLE_COUNT_1_BIT;
294 }
#define SPICES_PROFILE_ZONE
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.
VkPhysicalDevice m_PhysicalDevice
Definition VulkanUtils.h:95