CNA-GAP-022: DIRECTX9 ignores the MSAA request for RenderTargetCube

CNA snapshot 3b43bd86  ·  Known Issues › Functional gaps  ·  source links pinned to 3b43bd86

✓

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.

CreateRenderTargetCube discards multiSampleCount, so cube render targets are never multisampled on DIRECTX9; the cube target reports MultiSampleCount 0, so nothing is misreported.

Identifier
CNA-GAP-022
Category
Functional gap
Subsystem
Graphics & renderers
Status
Narrowed (partially fixed; describes only what survives)
Verified against
CNA 3b43bd86 (3b43bd8687ed46523d873f9bec4b32bd8481dcb5)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
RenderTargetCube(multiSampleCount > 0) on DIRECTX9

Expected behaviour

XNA multisamples cube render targets on HiDef devices that support it.

Actual behaviour at TARGET

DirectX9Renderer.cpp's CreateRenderTargetCube takes int /*multiSampleCount*/ and never passes it on, and D3D9RenderTargets.hpp records that D3D9RenderTargetCubeRenderer “deliberately does NOT support MSAA” (MSAA is 2D only). The public MultiSampleCount of such a cube target reports the renderer's real value (0).

Fixed since first recorded: 7c4a986b1 gave DIRECTX9 render targets real mip chains: a mipMap RenderTarget2D or RenderTargetCube allocates its whole chain, regenerates it on every transition away from the target, and GetData reads any level.

Source locations

Evidence

Checked by reading the named sources at 3b43bd86; nothing was built or executed for this entry.

Independent re-verification: Checked by reading the named sources at 3b43bd86 and the XNA IL (RenderTargetHelper.CreateSurfaces creates a multisampled surface for cube targets as well); nothing was built or executed for this entry.

Re-verified at c6dec91f: 7c4a986b1 made CreateRenderTarget2D and CreateRenderTargetCube pass mipMap through and regenerate the chain on ResolveForTransitionEXT (pinned by RenderTargetUploadRoundTripTests and the cube GetData contract, which CNA records reading level 1 exactly under Wine/DXVK); the cube's multisample count is still unused. Not executed.

Focused reproduction

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

Current tests

No DIRECTX9 fixture requests a multisampled cube render target.

Regression test

A DIRECTX9 fixture that requests a multisampled RenderTargetCube on a device that supports it and checks an anti-aliased edge on a face, or a documented refusal.

Blast radius

Multisampled cube render targets (dynamic environment maps with MSAA) on DIRECTX9; 2D targets are multisampled and cube targets render, without MSAA.

Workaround

Render each face into a multisampled RenderTarget2D and copy it into the cube.

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