Warm tip: This article is reproduced from serverfault.com, please click

Vulkan API : max MSAA samples supported is VK_SAMPLE_COUNT_8_BIT

发布于 2019-12-09 12:27:44

I am writing Vulkan API based renderer. Currently I am trying to add MSAA for color attachment. I was pretty sure I could use VK_SAMPLE_COUNT_16_BIT ,but limits.framebufferColorSampleCounts returns bit flags that allow MSAA level up to VK_SAMPLE_COUNT_8_BIT (inclusive)

I run on a brand new NVIDIA QUADRO RTX 3000 card. I also use latest NVIDIA driver: 441.28 I checked the limits in OpenGL and GPU caps viewer shows

GL_MAX_FRAMEBUFFER_SAMPLES = 32

How does it make sense? is the limit dictated by the Vulkan API only? And if the hardware doesn't support more than x8 then does it mean OpenGL driver simulates it on CPU, e.g via stuff like supersampling? That's what I was said by several rendering developers at khronosdev.slack ? Does it make sense? Doesn't a vendor have to compile with the standard and either implement MSAA the right way or not to implement at all?

Is that possible that OpenGL doesn't "really" support more than x8 MSAA ,but the drivers simulate it via stuff like supersampling?

UPDATE

This page explains the whole state of MSAA implmentation for OpenGL and actually it becomes clear from it why Vulkan doesn't provide more than x8 samples on my card. Here is the punch line:

Some NVIDIA drivers support multisample modes which are internally implemented as a combination of multisampling and automatic supersampling in order to obtain a higher level of anti-aliasing than can be directly supported by hardware.

Questioner
Michael IV
Viewed
0
Columbo 2019-12-09 21:59:36

framebufferColorSampleCounts is flags, not a count. See this enum for the values: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkSampleCountFlagBits.html

15 offers VK_SAMPLE_COUNT_1_BIT, VK_SAMPLE_COUNT_2_BIT, VK_SAMPLE_COUNT_4_BIT or VK_SAMPLE_COUNT_8_BIT.

This answers why you get 15, rather than a power of two, but it still begs the question why the NVidia driver is limiting you more than the OpenGL driver. Perhaps a question for the NVidia forums. You should double-check that your driver is up to date and that you're actually picking your NVidia card and not an integrated one.