CNA-GAP-020: SDL_GPU accepts ShaderEffect GLSL only in Vulkan-rule form (#version 450, explicit locations and SDL_gpu sets), so the shared GLSL ES 3.00 .cnj effect fixture does not load there
Evidence basis: source-verified at the pinned commit; recorded by CNA's own run (not repeated here); 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.
SdlGpuEffectRenderer::CompileProgram passes GLSL to libshaderc for SPIR-V, which rejects GLSL ES 3.00 sources and implicit uniform bindings; CNA's portable .cnj effect fixture is written in GLSL ES 3.00.
- Identifier
CNA-GAP-020- Category
- Functional gap
- Subsystem
- Graphics & renderers
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Recorded by CNA: CNA's own recorded run, not repeated here
- Tests touching this area
- Yes: see Current tests
- Affected contract
- ShaderEffect construction from GLSL source and ContentManager::Load of GLSL .cnj effects on SDL_GPU
Expected behaviour
A .cnj effect names GLSL source files; which dialect each renderer accepts is part of its contract (GetShaderDialectEXT).
Actual behaviour at TARGET
SdlGpuRenderer.cpp's SdlGpuEffectRenderer::CompileProgram accepts SPIR-V words directly or, when built with CNA_SDL_GPU_SHADER_EFFECTS, passes GLSL source unchanged to libshaderc for Vulkan-rule SPIR-V and declares one uniform buffer per stage and one fragment sampler to SDL_gpu. The renderer declares ShaderDialectEXT::SpirV and claims no GLSL language, deliberately, because the GLSL ES 3.00 profile is not a legal input on that route. The fixture in CnjEffectTests.cpp uses #version 300 es sources with a non-block uniform, which that route refuses; custom GLSL effects for SDL_GPU must follow Vulkan GLSL rules (for example #version 450) with explicit locations, uniform blocks and SDL_gpu's sets.
Source locations
modules/renderers/sdl-gpu/src/SdlGpuRenderer.cpp— SdlGpuEffectRenderer::CompileProgram and CompileGlslToSpirvmodules/content/tests/Microsoft/Xna/Framework/Content/CnjEffectTests.cpp— kVertSrc/kFragSrc GLSL ES 3.00 fixture
Evidence
Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. The GLSL ES rejection is the chapter package's reading of the SDL_GPU route; glslang's refusal of ES 3.00 for SPIR-V generation was not re-run here.
Independent re-verification: Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. CNA's own plan (plan_sdlgpu_modern_graphics.md) records the measured libshaderc refusal of the GLSL ES 3.00 profile on SDL_GPU (ES shaders for SPIR-V require version 310 or higher; SPIR-V requires location for user input/output; non-opaque uniforms outside a block are not allowed for Vulkan GLSL), and the fixture's sources use the same constructs. Tests: SDL_GPU's own ShaderEffect fixtures use #version 450; CnjEffectTests is not run against SDL_GPU in any workflow; its expectation predicate is published separately as CNA-BUG-204.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
SDL_GPU ShaderEffect fixtures use its own dialect; no test loads the shared GLSL ES fixture on SDL_GPU.
Regression test
A test that asserts the documented refusal (or a translation) for GLSL ES 3.00 on SDL_GPU.
Blast radius
Content pipelines that ship one GLSL ES effect for all GL-family and SDL_GPU targets.
Workaround
Ship a separate Vulkan-rule GLSL (or SPIR-V) variant for SDL_GPU.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Known issues
- Functional gap index