CNA-BUG-114: WEBGPU always creates a Depth24PlusStencil8 back-buffer depth attachment but PresentationParameters keeps the requested DepthFormat
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.
RecreateDepthTexture always uses Depth24PlusStencil8 and the renderer has no applied-format override, so PresentationParameters.DepthStencilFormat reports the requested format instead of the attachment that exists.
- Identifier
CNA-BUG-114- Category
- Bug
- Subsystem
- Graphics & renderers
- Status
- Open
- Verified against
- CNA
3b43bd86(3b43bd8687ed46523d873f9bec4b32bd8481dcb5) - 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
- PresentationParameters.DepthStencilFormat after device creation/Reset on WEBGPU
Expected behaviour
CNA writes the applied formats back into PresentationParameters through GetAppliedDepthStencilFormatEXT (NormalizeAppliedPresentationFormats in GraphicsDevice.cpp); SDL_GPU and FNA3D override it.
Actual behaviour at TARGET
WebGPURenderer.cpp's RecreateDepthTexture always requests WGPUTextureFormat_Depth24PlusStencil8, and the WebGPU renderer overrides only the applied MSAA count and back-buffer colour format, so the requested depth format is echoed. A game that asked for Depth24 is told it has no stencil (Clear with Stencil throws InvalidOperationException, stencil state is validated against a format that does not match the hardware), and one that asked for None is told it has no depth buffer.
Source locations
modules/renderers/webgpu/src/WebGPURenderer.cpp— WebGPURenderer::RecreateDepthTexturemodules/renderers/webgpu/include/CNA/Internal/Renderers/WebGPU/WebGPURenderer.hpp— overrides GetAppliedMultiSampleCountEXT and GetAppliedBackBufferFormatEXT, not GetAppliedDepthStencilFormatEXTmodules/graphics/src/Xna/GraphicsDevice.cpp— NormalizeAppliedPresentationFormats
Evidence
Checked by reading the named sources at 3b43bd86; nothing was built or executed for this entry. Whether the device's stencil gating consults PresentationParameters or HasRealBackBufferStencilBuffer on WEBGPU was not traced; the reported format is wrong either way.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
BackBufferFormatContractTests.cpp covers the applied back-buffer colour format; no WEBGPU test compares the reported depth format with the attachment that exists.
Regression test
A WEBGPU applied-formats test that requests Depth24 and None and expects the depth format actually created.
Blast radius
Games that read PresentationParameters.DepthStencilFormat to decide on stencil techniques on WEBGPU.
Workaround
Request Depth24Stencil8 explicitly on WEBGPU.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Known issues
- Bug index