CNA-GAP-065: The renderer capability profile has no feature for pre-compiled SPIR-V payloads, so SDL_GPU reports every source-dialect feature Unsupported
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 3b43bd86; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
BuildRendererCapabilityProfileEXT maps a renderer's declared dialect onto six source-dialect features. SDL_GPU declares SpirV, which CNA documents as compiled bytecode rather than source, so all six read Unsupported and no profile entry says a SPIR-V payload is accepted.
- Identifier
CNA-GAP-065- Category
- Functional gap
- Subsystem
- Graphics & renderers
- Status
- Open
- Verified against
- CNA
3b43bd86(3b43bd8687ed46523d873f9bec4b32bd8481dcb5) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- CNA::RendererCapabilityProfile ShaderDialect* features (GraphicsDevice::GetRendererCapabilityProfileEXT)
Expected behaviour
The RendererFeature ShaderDialect* entries are documented as 'Source-based effects consume ...', and ShaderDialectEXT::SpirV as 'Already-compiled SPIR-V bytecode, not Vulkan GLSL source text'. The profile exists so that a caller can choose a payload without trying it; for a bytecode-consuming renderer the machine-readable profile cannot say which payload it takes.
Actual behaviour at TARGET
BuildRendererCapabilityProfileEXT in GraphicsDevice.cpp sets ShaderDialectGlslDesktop/GlslEs/GlslVulkan/Hlsl/Msl/Wgsl to supported only when ExecutesShaderEffectSourceEXT() is true and the declared dialect equals that enumerator. SDL_GPU declares ShaderDialectEXT::SpirV, for which no feature exists (RendererCapabilityProfile.hpp), so all six read Unsupported. This is deliberate: SdlGpuRenderer.hpp says GLSL is not claimed even in a libshaderc build, because that route compiles Vulkan-rule GLSL, where GLSL ES 3.00 is not a legal input. SDL_GPU answers ExecutesShaderEffectSourceEXT() true whenever a device exists, so its profile shows source execution supported with no source dialect. A caller must ask GraphicsDevice::SupportsShaderLanguageEXT(SpirV, stage) instead.
Source locations
modules/graphics/src/Xna/GraphicsDevice.cpp— GraphicsDevice::BuildRendererCapabilityProfileEXT dialect mappingmodules/graphics/include/CNA/RendererCapabilityProfile.hpp— RendererFeature: six source-dialect features, none for SPIR-Vmodules/renderers/sdl-gpu/include/CNA/Internal/Renderers/SdlGpu/SdlGpuRenderer.hpp— GetShaderDialectEXT (SpirV) and ExecutesShaderEffectSourceEXTmodules/renderers/sdl-gpu/src/SdlGpuRenderer.cpp— SdlGpuEffectRenderer::CompileProgram (SPIR-V or libshaderc GLSL)
Evidence
Checked by reading the named sources at 3b43bd86; nothing was built or executed for this entry.
Re-verified at c6dec91f: RendererFeature still has the six source-dialect features and no SPIR-V one, the profile mapping in GraphicsDevice.cpp is unchanged, and SDL_GPU still declares SpirV; SDL_GPU is now the only surviving renderer that declares it. No profile snapshot test pins the answer. Not executed.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
No SDL_GPU capability-profile snapshot exists, and no test reads the six dialect features of a SPIR-V renderer.
Regression test
Add a SPIR-V dialect feature (and report GlslVulkan where libshaderc is built in), with an SDL_GPU profile snapshot asserting it.
Blast radius
Code that selects shader source from the capability profile; it finds no usable dialect on SDL_GPU.
Workaround
Query SupportsShaderLanguageEXT instead of the profile's dialect features.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Known issues
- Functional gap index