Skip to content

D3D12.X: cache invariant slots in hot hooks - #137

Draft
bmjask wants to merge 1 commit into
stack/133-sparse-buffers-unlockedfrom
stack/134-cache-hot-hook-slots
Draft

bmjask wants to merge 1 commit into
stack/133-sparse-buffers-unlockedfrom
stack/134-cache-hot-hook-slots

Conversation

@bmjask

@bmjask bmjask commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #136.

This is an internal draft stack in bmjask/xcl; it is not an upstream merge request.

What and why

This unit isolates d3d12.x: cache invariant slots in hot hooks as one reviewable step in the redesign.

Upstream overlap

This overlaps upstream PR xcl-dev#903 and is retained only as an internal reconciliation draft.

What is in it

  • 86c7f56d is the cleaned-stack form of integrated commit 9aa35940.

The patch content is preserved; only ancestry changed to omit a canceled add/revert sequence.

Tested

Tests were not rerun while packaging this already-integrated change into the draft stack.

Regression run

Not run during stack packaging.

Not tested

  • Windows MSVC build and test suite
  • D3D12 GPU execution
  • scripts/smoke.ps1 main/head comparison

AI use

Codex, GPT-5.6-sol, removed canceled ancestry, created the stack branch, and drafted this description. It did not author new code during stack packaging.

@bmjask
bmjask force-pushed the stack/134-cache-hot-hook-slots branch 3 times, most recently from 4d5a973 to e67a9cf Compare November 27, 2026 05:14
Hot resource, command-list, allocator, fence, and queue hooks locked the global adopted-class table and scanned method names on every call. A translated draw paid this for both its draw and pipeline bind, and all recording threads contended on the same lock.

Adapt xcl-dev#903 by caching the first slot at each interface-family call site. COM interface versions append methods, and a table-driven test verifies every cached method has one nonzero slot throughout its family. Cold or interface-dependent lookups remain dynamic.

The Windows GNU library/test cross-check passed with the existing warnings. Windows MSVC runtime, GPU, and smoke tests were not available here.

Source implementation and native tests: xcl-dev#903 by mastrr9, authored with Claude Code (Claude Opus 5.5) and audited with Antigravity.

Assisted-by: Codex (GPT-5.6-sol)
@bmjask
bmjask force-pushed the stack/134-cache-hot-hook-slots branch from e67a9cf to 758c154 Compare November 27, 2026 12:35
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