Skip to content

Preserve a numeric byte offset added to a root-constant pointer pair - #1

Open
MichaelSmithAI wants to merge 1 commit into
itsRevela:shaders/root-constant-addressesfrom
MichaelSmithAI:keep-byte-offset-for-root-constant-pair
Open

MichaelSmithAI wants to merge 1 commit into
itsRevela:shaders/root-constant-addressesfrom
MichaelSmithAI:keep-byte-offset-for-root-constant-pair

Conversation

@MichaelSmithAI

@MichaelSmithAI MichaelSmithAI commented Nov 24, 2026 •

Copy link
Copy Markdown

On a5a40bc, a valid compute shader that adds a byte offset from a separate root parameter to a two-word pointer gets refused. The tracer already recognizes the pointer from its high half. When the offset comes from the first word of another constants parameter, it also classifies that word as a pointer base and loses the sum.

This patch keeps that separate value as the dynamic byte offset once the pointer pair is known. The source-built wave32 regression checks both halves of the tracked pointer and the identity of the offset. It fails on the parent and passes on this revision. The Linux shader suite passed all 67 tests. Windows shader and GPU test targets type-checked.

The five and eight program measurements on the surrounding branches do not identify a title shader using this additional form. We also applied this patch to the combined Marvisak#709/Marvisak#710 tester build at 91e3d64. An adapted shader used offsets of 0, 4 and 12 bytes from the separate numeric parameter to read three distinct input words, then wrote through a stride-8 root UAV. All eight output words matched at each offset on an RTX 4090 with Wine and vkd3d-proton. This measured the combined build. Windows-native and GTA VI rendering results remain pending. AI-assisted implementation and testing.

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