Skip to content

DX11 tonemap resources retry every frame, leaking a 16.6 MB HDR texture per retry #169

Description

@CanReader

src/Graphics/DirectX11/DirectX11Renderer.cpp:165-166; failure paths :1272-1276, :1284-1285, :1307-1314;
overwrite at :1266; member at src/Graphics/DirectX11/DirectX11Renderer.hpp:187

Line 165-166 retries creation whenever m_tonemapResourcesCreated is false. All three failure paths return
without releasing what was already created and without latching the failure, and :1266 overwrites the
raw m_hdrTexture pointer each time.

At 1080p RGBA16F that is ~16.6 MB leaked per frame, unbounded, ending in D3D device removal.

Trigger is realistic and already documented: a stale tonemap.hlsl: exactly the asset-staleness pitfall in
CLAUDE.md §5.8.

Severity: leak (catastrophic rate) → crash.

Found by a full audit of the graphics layer. Assessed severity: leak → crash.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: renderingRenderer, shaders, post processingbackend: dx11Specific to the dx11 backendbugSomething isn't workingcrashCauses a crash or hangpriority: criticalCrash, data loss, or blocks other work

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions