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 009d40f5; 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
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
- PresentationParameters.DepthStencilFormat after device creation/Reset on WEBGPU (and SDL_RENDERER)
Expected behaviour
CNA writes the applied formats back into PresentationParameters through GetAppliedDepthStencilFormatEXT (NormalizeAppliedPresentationFormats in GraphicsDevice.cpp); VULKAN does so since VULKAN-348.
Actual behaviour at TARGET
WebGPURenderer.cpp's RecreateDepthTexture always requests WGPUTextureFormat_Depth24PlusStencil8, and the WebGPU renderer overrides only the applied MSAA count, 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. SDL_RENDERER, which has no depth buffer at all, similarly echoes a requested Depth24 (see CNA-GAP-014).
Source locations
modules/renderers/webgpu/src/WebGPURenderer.cpp— WebGPURenderer::RecreateDepthTexturemodules/renderers/webgpu/include/CNA/Internal/Renderers/WebGPU/WebGPURenderer.hpp— overrides GetAppliedMultiSampleCountEXT onlymodules/graphics/src/Xna/GraphicsDevice.cpp— NormalizeAppliedPresentationFormats
Evidence
Checked by reading the named sources at 009d40f5; 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
Vulkan_AppliedFormats covers VULKAN; no WEBGPU equivalent exists.
Regression test
Register the applied-formats fixture for WEBGPU (and SDL_RENDERER), expecting the formats 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