CNA-BUG-204: CnjEffectTest.LoadsRealCnjFixture and CnjStockEffectTest.CustomGlslEffectStillWorks expect a valid GLSL ES effect on any renderer that executes shader source under a non-HLSL dialect, which WebGPU (WGSL only) and SDL_GPU with libshaderc (Vulkan-rule GLSL) refuse

CNA snapshot 009d40f5  ·  Known Issues › Current bugs  ·  source links pinned to 009d40f5

✓

Evidence basis: source-verified at the pinned commit; inferred from the source (the behaviour was not run); 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.

The two tests carry the same expectation helper, which returns Valid for a renderer that reports CustomEffects, executes shader source and does not declare HLSL. WebGPU (Wgsl) and SDL_GPU with libshaderc (SpirV) match that description, yet both refuse the #version 300 es fixtures, so a CnaTests run defaulting to either renderer would fail both tests.

Identifier
CNA-BUG-204
Category
Bug
Subsystem
Testing & evidence
Status
Open
Verified against
CNA 009d40f5 (009d40f5dd085c4e674d3479675fac84b12b3e0a)
Severity
Low (a triage suggestion, not a project priority)
Evidence basis
Inferred (strong): follows from the code, but the behaviour was not run
Tests touching this area
Yes: see Current tests
Affected contract
modules/content/tests CnjEffectTest.LoadsRealCnjFixture (ExpectedGlslEffectValidity)

Expected behaviour

A test's expectation should follow the renderer's declared contract; the helper's own comment says GetShaderDialectEXT says which source. WebGPU declares Wgsl and compiles WGSL only; SDL_GPU declares SPIR-V intake (CNA-GAP-020) and its GLSL route compiles Vulkan-rule GLSL, not GLSL ES 3.00.

Actual behaviour at TARGET

ExpectedGlslEffectValidity, duplicated in CnjEffectTests.cpp and CnjStockEffectTests.cpp, returns Invalid for an HLSL dialect or when CustomEffects or ExecutesShaderEffectSourceEXT is false, RendererChoice for a non-executing renderer with an unknown dialect, and otherwise Valid. WebGPU answers true to both queries and declares Wgsl; WebGPUEffectRenderer::CompileProgram hands the text to wgpuDeviceCreateShaderModule as WGSL, which refuses the #version line. SDL_GPU with CNA_SDL_GPU_SHADER_EFFECTS answers true to both and, since SMG-0006, declares SpirV; SdlGpuEffectRenderer::CompileProgram passes GLSL unchanged to libshaderc for Vulkan-rule SPIR-V, which refuses ES 3.00 and non-block uniforms. Both tests therefore expect IsEffectValid() to be true where the renderer rejects the payload. SDL_GPU without libshaderc reports CustomEffects false, so its expectation is Invalid and holds.

Source locations

Evidence

Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. Confidence is 'probable': the failure depends on libshaderc rejecting the ES 3.00 fixture (as CNA-GAP-020 records) and on CnaTests being run with SDL_GPU as the default renderer, which no workflow does.

Independent re-verification: Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. CNA's own records corroborate the outcome: WebGPU's CnaTests baseline (plan_webgpu.md, 2026-09-06) lists both tests as failing because the renderer refuses the GLSL text as WGSL, and CNA's earlier SDL_GPU baselines (plan_fx.md, plan_postaudit.md) list them too. Those runs predate the WINCLOSE-0030 helper; for WebGPU its answer (Valid) is unchanged, while SDL_GPU's expectation turned to Valid only when SMG-0006 (2026-09-23) made SdlGpuRenderer declare SpirV and execute shader source. CNA measured libshaderc refusing the same ES 3.00 constructs on SDL_GPU (plan_sdlgpu_modern_graphics.md). No workflow runs CnaTests on either renderer; CI's unfiltered run uses OPENGLES3, where the expectation holds.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

The test runs in whatever renderer the CnaTests build defaults to; CI's unfiltered run uses OPENGLES3, where the expectation holds.

Regression test

Make the expectation dialect-aware (Invalid, or RendererChoice, for SpirV/GlslVulkan dialects) and run CnaTests once with SDL_GPU as default.

Blast radius

SDL_GPU-default test runs only; the defect is in the test, not in effect loading.

Workaround

No workaround is known.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.

Known issues
Bug index