Skip to content

gpu: preserve the fifth ordinary root constant during binding - #158

Merged
pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
gdemontalivet:contrib/mac-root-constant-dword-four
Nov 26, 2026
Merged

pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
gdemontalivet:contrib/mac-root-constant-dword-four

Conversation

@gdemontalivet

Copy link
Copy Markdown
Contributor

Backports Marvisak/VIctory #2703 by @Calvix2k to macOS main. The binder currently interprets dword 4 as a view offset for every root parameter. When a compute shader reads the fifth ordinary root constant, this sends the binder looking for a buffer and can drop the dispatch. The patch checks the root parameter type before resolving an offset. The regression covers constants, descriptors and tables.

I ran the clean PR branch on an M5 Max with CrossOver Preview 20261015 and D3DMetal. The Windows GPU test binary passed all 233 enabled tests, including the new regression. One test was ignored.

A separate integration build with this type check and additional null/invalid-view handling reached 90 world frames past the prologue's first heavy draw. Its control reported root-offset drops for six compute programs from XboxBvhBuilder.dll. None of those hashes appeared in the integration run's sampled drop reports. This gameplay observation covers the combined changes. The scene remained overexposed and ran below playable speed.

Backport Marvisak/VIctory#2703 (7bb3ebaf46081958a6546cd74bd8290cd3a3b715) to the macOS branch.
@pragyaangaur
pragyaangaur merged commit 5bfea96 into pragyaangaur:main Nov 26, 2026
1 check passed
@pragyaangaur pragyaangaur added area:gpu Host GPU runtime: resources, copies, presenting d3dmetal A difference in Apple's D3DMetal labels Nov 26, 2026
ZebeastSantaCruz83142069 pushed a commit to ZebeastSantaCruz83142069/VIctory-macOS831 that referenced this pull request Nov 26, 2026
* GPU: the depth bounds test reaches the host

Keep the kind-21 enable flag in the graphics state and pipeline cache
key. Use DEPTH_STENCIL1 for vertex and mesh streams that request the
test when the host supports it. Unsupported hosts fall back to the
plain depth-stencil state and warn once.

Forward the title's depth bounds to the host command list and replay
them when binding a graphics pipeline, including after the indirect
clamp. New and reset lists start with D3D12's 0..1 default.

Synthetic title draws and mesh dispatches on an RTX 5070 and WARP
kept excluded pixels at the cleared depth of 0.5 and wrote 0.25 to
included pixels. Fresh and reset lists also wrote 0.25. A forced
unsupported run drew all pixels, and the stream reader regression
failed with the upstream reader. Since the rebase onto 940d32f the
vertex stream also carries the rectangle lists' geometry shader and
both streams the topology type; only the draw ran again, on WARP.
The console subobject layout and call signature still need title-side
verification.

* GPU tests: drop the depth bounds mesh test that starts dxc

The triage on pragyaangaur#158 asks for a maintainer's sign-off on new code that
starts an external process; the only such code was the mesh-dispatch
test, which ran dxc from VICTORY_PC_DXC and was skipped without it.
The stream-level test and the vertex draw test stay; the mesh path of
the shared stream builder is no longer exercised on a GPU here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: r4. <192970269+r4tedx@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Host GPU runtime: resources, copies, presenting d3dmetal A difference in Apple's D3DMetal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants