Repository navigation
Graphics G4 Windows-session agenda: fact warning by reference, preparedResource memo, thumbnail fold, raster front half - #1264
Draft
iamfatness wants to merge 5 commits into
Draft
iamfatness wants to merge 5 commits into
iamfatness wants to merge 5 commits into
Conversation
iamfatness
force-pushed
the
codex/graphics-g4-agenda
branch
from
November 27, 2026 17:23
3161d22 to
9fff045
Compare
iamfatness
changed the base branch from
codex/win-d3d11-graphics-reference
to
main
November 27, 2026 17:56
… review 2) The D3D11 adapter's graphicsPreparations loop copied overlayRaster_.lastWarning() into a GraphicsFrameFact on every Program frame, an allocation per graphic per frame on the render thread whenever a warning is longer than the small-string buffer. Metal fixed this in G2 review 2 (GraphicsFrameFact::sharedReason); D3D11 was flagged for a Windows session. CompositorOverlayRaster now keeps lastWarning_ and a sharedWarning_ in step through setWarning(): a prepared result's own warning travels by an aliasing pointer into the cache result, fixed wording is interned once, and only the rare failed-scale text is built. The adapter passes sharedWarning() as the fact's sharedReason with an empty reason. Every warning string is unchanged; readers already use reasonText(). Test: D3D11OverlayRaster.WarningsTravelByReferenceWithoutAPerTickCopy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…G2 D7) The facts loop calls preparedResource() for every preparation on every Program tick, and beginFrame() clears activeResource_, so the D3D11 raster allocated a fresh GraphicsPreparedResource per call. Metal got a weak, fixed-size memo in G2 (D7); Windows was flagged for a Windows session. Port it: 32 weak entries keyed by the cache result's address. A live weak entry proves the result is still alive, so the address cannot have been reused. The same prepared texture now yields the same resource pointer while anyone holds it, with no allocation. Resource fields are unchanged. Test: D3D11OverlayRaster.PreparedResourceIsStableWhileHeld. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one helper GraphicsThumbnail.cpp's Metal branch (G5) duplicated the D3D11 branch's overlay setup because the D3D11 branch could not be compiled on the Mac. Both branches now share thumbnailInput() (overlay, template fields, brand, size) and thumbnailResult() (the JSON row). Only the raster call and the backend label differ. The output is unchanged. The Metal branch is compile-unverified here (no Apple toolchain on Windows); CI's native-metal-macos job compiles it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c 5.1) The front half of rasterOverlayTexture (admission rules 1-8, spec 3.2) was duplicated in CompositorOverlayRaster.cpp and CoreTextOverlayRaster.mm and held together only by the contract test. The Metal spec deferred the extraction to a Windows session. native/src/compositor/OverlayRasterFrontHalf.h (portable, header-only) now owns: - rule 1, the metadata bound; - rule 2, dimensions; - rule 3, the strict-salted signature; - rule 4, prepared-resource compatibility; - rule 7, the state table; - rule 8, capacity detection; - the operator wording and the interned warning. Both rasters call it. Rules 5-6 (cache find/findOrRequest) stay per backend, because the Cache, Request and texture types differ. Every decision and string is unchanged, so OverlayRasterContract.* and WindowsMatchesItsOwnReference still pass against the committed reference. New portable test: OverlayRasterFrontHalf.* (boundaries without a GPU). The CoreTextOverlayRaster.mm edits are compile-unverified on Windows (no Apple toolchain). They swap inline expressions for the same helpers. CI's native-metal-macos job compiles them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iamfatness
force-pushed
the
codex/graphics-g4-agenda
branch
from
November 27, 2026 17:56
9fff045 to
96f86a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1258 (
codex/win-d3d11-graphics-reference). Draft. Do not merge.This does the four Windows-session agenda items that the Metal graphics G3-G5 plan (Task 7, step 6) and its outcomes doc carried. There is one commit per item, plus a docs commit. These are refactors and render-thread allocation fixes. No rendered pixel changes:
GraphicsRasterReference.WindowsMatchesItsOwnReferencepasses against the committed reference, which was not regenerated.CompositorOverlayRastergainssharedWarning()andsetWarning(), as on Metal.D3D11CompositorAdapter'sgraphicsPreparationsloop passessharedReasoninstead of copyinglastWarning(). The warning text is unchanged.preparedResource()memoCompositorOverlayRaster.cpp:504"Windows still allocates per call")GraphicsThumbnail.cpphas onethumbnailInput()and onethumbnailResult()shared by the D3D11 and Metal branches.compositor/OverlayRasterFrontHalf.hcovers rules 1-4 and 7-8 plus the wording and interned warnings. Both rasters call it. Rules 5-6 (cache find and request) stay per backend because the types differ.New tests:
D3D11OverlayRaster.WarningsTravelByReferenceWithoutAPerTickCopyD3D11OverlayRaster.PreparedResourceIsStableWhileHeldOverlayRasterFrontHalf.*(6 tests, portable)Tests (Windows 11 26300, VS 2026,
--config Release)OverlayRasterContract.*:GraphicsRasterParity*:GraphicsCompositionPixel.*:GraphicsRasterReference.*Graphics*:D3D11*:OverlayRaster*:OverlayTile*:ParityPng.*The red tests are the three already known, which a separate PR is fixing:
OverlayRasterContract.FailedScaleKeepsTheAcceptedRasterOverlayRasterContract.ImageDecodeFailureWordingGraphicsTemplateRegistry.ABrokenTemplateThumbnailDoesNotBlockTheOthersUnverified
GraphicsThumbnail.cpp, and inCoreTextOverlayRaster.mmthe front half inrasterOverlayTexture, theinternedWarningforwarder and two comments. Thenative-metal-macosCI job compiles them. Metal contract and pixel tests were not run.🤖 Generated with Claude Code