CNA-BUG-109: The engine layer's capability-name table has no IndirectDraw entry, although its comment says a missing capability fails to compile

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

✓

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.

nameOfCapability in graphics-ext's RequireCapability.cpp names 18 of the 19 GraphicsCapability members and returns 'an unrecognised capability' for IndirectDraw; the switch has no default but a missing case is at most a compiler warning.

Identifier
CNA-BUG-109
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
CNA::Graphics::detail::nameOfCapability (refusal messages of the graphics-ext RequireCapability helpers)

Expected behaviour

The helper's own comment: "Listed exhaustively and with no default:, so a capability added later fails to compile here rather than reaching a log as an unnamed capability".

Actual behaviour at TARGET

RequireCapability.cpp lists 18 of the 19 members of CNA::GraphicsCapability (GraphicsCapability.hpp) and omits IndirectDraw, falling through to "an unrecognised capability". A missing enumerator in a switch without default does not fail compilation in C++ (only -Wswitch warns, and neither graphics-ext nor the root CMake enables it), so the safeguard the comment relies on does not exist. At 009d40f5 the indirect-draw users (StorageBuffer.cpp, GpuInstanceCuller.cpp) test the capability directly, so no current refusal prints the wrong name.

Source locations

Evidence

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

Independent re-verification: Checked by reading the named sources at 009d40f5; nothing was built or executed. RequireCapabilityTests.cpp does enumerate capabilities through nameOfCapability (EveryCapabilityHasItsOwnName asserts none maps to the fallback), but it iterates a hand-written list of 18 capabilities that also lacks IndirectDraw, so it cannot notice the missing name; the regression is to add IndirectDraw to both the switch and that list, or to derive the list from the enum.

Focused reproduction

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

Current tests

No test enumerates GraphicsCapability through nameOfCapability.

Regression test

Add the case and a test that every enumerator maps to a name other than the fallback (or compile the file with -Werror=switch).

Blast radius

Future refusal messages for IndirectDraw; latent today.

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