Skip to content

mullion: coalesce redundant clears, cross-view UNORM/sRGB clears, and render-to-color-clear store actions - #366

Open
cyyever wants to merge 1 commit into
dttdrv:mainfrom
cyyever:pr/coalesce-redundant-clears
Open

cyyever wants to merge 1 commit into
dttdrv:mainfrom
cyyever:pr/coalesce-redundant-clears

Conversation

@cyyever

@cyyever cyyever commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Record the view's WMTPixelFormat on ClearEncoderData (src/mullion/mullion_context.hpp, src/mullion/mullion_context.cpp) and match attachments across views referencing the same texture subresource (sameTextureSubresource).
  • Coalesce consecutive color or depth/stencil clears targeting the same subresource/depth plane/array length into a single clear encoder while merging fence dependencies.
  • Allow cross-view UNORM/sRGB color clears on the same subresource to fold into a subsequent render pass when RGB clear values are [0, 1] endpoints (bit-identical between linear and sRGB), while leaving non-endpoint clears separate to preserve linear encoding.
  • Downgrade a render pass's color attachment store_action from WMTStoreActionStore to WMTStoreActionDontCare when immediately followed by a full clear of the same subresource, matching the existing depth/stencil optimization.
  • Add tests/d3d11/d3d11_clear_coalesce.cpp (registered in tests/d3d11/meson.build) covering pixel correctness and MULLION_TRACE_ENCODERS pass counts for all cases.

Verification

  • Syntax-checked src/mullion/mullion_context.cpp and tests/d3d11/d3d11_clear_coalesce.cpp with x86_64-w64-mingw32-g++ -std=c++20 -Wall -Wextra.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant