Release Type: Official Release
Version: 4.3.0.2507
Platform(s): Vulkan (all)
Describe the bug
MSAA can never engage on Vulkan regardless of GPU. Five separate sites (decompiled
4.3.0.2507 Stride.Graphics.dll, Vulkan variant):
| # |
Site |
Code |
Effect |
| 1 |
GraphicsDeviceFeatures..ctor |
fills mapFeaturesPerFormat with MultisampleCount.None, FormatSupport.None for all 256 formats — device never queried |
every format reports 1 sample max (and, separately, FormatSupport.None — a latent bug for anything gating on it) |
| 2 |
Texture.CreateImage() |
samples = (VkSampleCountFlags)1; literal — TextureDescription.MultisampleCount never read |
no multisampled VkImage can be created |
| 3 |
PipelineState.Recreate() |
rasterizationSamples = 1 and every VkAttachmentDescription.samples = 1; Description.Output.MultisampleCount never read |
pipelines/render passes single-sample |
| 4 |
Texture.GetImageView |
if (IsMultisample) throw new NotImplementedException(); |
the one that actually fires |
| 5 |
CommandList.CopyMultisample |
throw new NotImplementedException(); |
no hardware resolve |
Because of (1), ForwardRenderer.InitializeCore clamps any requested MSAALevel down to None
with only a warning — the caps table is the only thing standing between the user and a crash.
We verified: patching the caps entries by reflection makes the compositor request a 4× target
and the frame dies at site (4) with NotImplementedException from Texture.GetImageView.
To Reproduce
- Any Vulkan game, set
MSAALevel = MultisampleCount.X4 on the forward renderer.
- Observe the "not supported, falling back" warning on every GPU (or force the caps table via
reflection to see the underlying NotImplementedException at site 4).
Expected behavior
Either working MSAA on Vulkan, or documentation stating it is unimplemented on this backend.
Additional context
Fix is real work, not a one-liner: thread TextureDescription.MultisampleCount into
VkImageCreateInfo.samples; thread RenderOutputDescription.MultisampleCount into
rasterizationSamples and both attachment descriptions; implement CopyMultisample over
vkCmdResolveImage (+ VK_KHR_depth_stencil_resolve for depth); fill the caps table from
vkGetPhysicalDeviceImageFormatProperties. Until then, Vulkan/Linux has no hardware AA — which
makes the FXAA defect (#3316) the only AA on the platform.
Release Type: Official Release
Version: 4.3.0.2507
Platform(s): Vulkan (all)
Describe the bug
MSAA can never engage on Vulkan regardless of GPU. Five separate sites (decompiled
4.3.0.2507
Stride.Graphics.dll, Vulkan variant):GraphicsDeviceFeatures..ctormapFeaturesPerFormatwithMultisampleCount.None, FormatSupport.Nonefor all 256 formats — device never queriedFormatSupport.None— a latent bug for anything gating on it)Texture.CreateImage()samples = (VkSampleCountFlags)1;literal —TextureDescription.MultisampleCountnever readVkImagecan be createdPipelineState.Recreate()rasterizationSamples = 1and everyVkAttachmentDescription.samples = 1;Description.Output.MultisampleCountnever readTexture.GetImageViewif (IsMultisample) throw new NotImplementedException();CommandList.CopyMultisamplethrow new NotImplementedException();Because of (1),
ForwardRenderer.InitializeCoreclamps any requestedMSAALeveldown to Nonewith only a warning — the caps table is the only thing standing between the user and a crash.
We verified: patching the caps entries by reflection makes the compositor request a 4× target
and the frame dies at site (4) with
NotImplementedExceptionfromTexture.GetImageView.To Reproduce
MSAALevel = MultisampleCount.X4on the forward renderer.reflection to see the underlying
NotImplementedExceptionat site 4).Expected behavior
Either working MSAA on Vulkan, or documentation stating it is unimplemented on this backend.
Additional context
Fix is real work, not a one-liner: thread
TextureDescription.MultisampleCountintoVkImageCreateInfo.samples; threadRenderOutputDescription.MultisampleCountintorasterizationSamplesand both attachment descriptions; implementCopyMultisampleovervkCmdResolveImage(+VK_KHR_depth_stencil_resolvefor depth); fill the caps table fromvkGetPhysicalDeviceImageFormatProperties. Until then, Vulkan/Linux has no hardware AA — whichmakes the FXAA defect (#3316) the only AA on the platform.