CNA-BUG-194: The SDL2-only configuration guard recommends VULKAN, which the SDL2 platform cannot run
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
Sdl2OnlyConfiguration.cmake's error text lists VULKAN among the SDL-independent renderers to choose, but Sdl2Platform::GetVulkanSurface returns null, so a VULKAN build on SDL2 can only fail later at GraphicsDevice construction.
- Identifier
CNA-BUG-194- Category
- Bug
- Subsystem
- Build & CI
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Severity
- Low (a triage suggestion, not a project priority)
- Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- cmake/Sdl2OnlyConfiguration.cmake's diagnostic recommending SDL-independent renderers
Expected behaviour
When an SDL2 platform and SDL2 audio are selected with a renderer that links SDL3, the guard refuses and names renderers the configuration can actually use. A renderer it recommends should reach a working device.
Actual behaviour at TARGET
The message reads “Choose OPENGLES2/OPENGLES3/OPENGL33, VULKAN, SOFTWARE, HEADLESS or another SDL-independent renderer.” But Sdl2Platform::GetVulkanSurface returns nullptr and vulkanSurface stays false, so a VULKAN build on the SDL2 platform reaches RequirePlatformVulkanSurface, which throws PlatformNotSupportedException(VulkanSurface) at device construction. VULKAN is SDL-independent, so the guard does not reject it, but recommending it sends the user to a configuration that cannot start a device.
Source locations
cmake/Sdl2OnlyConfiguration.cmake— the error text recommending VULKANmodules/platform/src/Sdl2/Sdl2Platform.cpp— GetVulkanSurface returns nullptr; GetCapabilities leaves vulkanSurface falsemodules/graphics/include/CNA/Internal/Renderers/Common/PlatformVulkanRendererState.hpp— RequirePlatformVulkanSurface throws on a null service
Evidence
Checked by reading the guard's message, Sdl2Platform's Vulkan accessor and capability set, and the Vulkan renderer's RequirePlatformVulkanSurface at 009d40f5. Not executed. The SDL2 platform's own guide already lists VULKAN as “not yet -- needs IPlatformVulkanSurface”, so the guard's recommendation contradicts CNA's own renderer-compatibility table.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
Sdl2OnlyRendererGate.cmake checks that SDL3-linked renderers are rejected and that OPENGLES3 is accepted; it does not check the text of the recommendation.
Regression test
Drop VULKAN from the message (or add an SDL2 Vulkan surface service). A test could assert the recommended set contains no renderer whose SDL2 capability is false.
Blast radius
Users configuring an SDL2-only build who follow the guard's advice and pick VULKAN; every other recommended renderer (the GL profiles, SOFTWARE, HEADLESS) works on SDL2.
Workaround
On the SDL2 platform choose OPENGLES2/OPENGLES3/OPENGL33, SOFTWARE or HEADLESS, not VULKAN.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- User guide
- Platform Support: combination rules
- Internals
- SDL2 platform internals: graphics
- Maintainer workflow
- Change build configuration: renderer rules
- Known issues
- Bug index