Repository navigation
Exercise signed texture sample offsets on both pixel-shader axes - #1
Open
MichaelSmithAI wants to merge 2 commits into
Open
MichaelSmithAI wants to merge 2 commits into
MichaelSmithAI wants to merge 2 commits into
Conversation
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.
This test exercises the pixel shader path added in upstream PR #634. The author measured four additional GTA VI pixel programs passing shader validation on that change, including one used in volumetric lighting reconstruction.
An original 2D shader samples a texture and exports its color. It compiles with immediate offsets (−8, +7) and (+7, −8). Each axis separately rejects +8 and −9 with the range-specific diagnostic. The fixture follows the shader through decoding, resource tracking, control-flow analysis and DXIL emission.
On the parent revision the first valid case fails at offset 60 with the unsupported instruction. On 260611a all 57 Linux shader library tests passed with this regression. To run it alone:
This change adds only the regression. The retail validation numbers come from the original PR. AI assistance was used to develop and verify the synthetic fixture.
Native pixel readback. The Windows differential harness has a case that draws the same shader through VIctory and the native PC compiler. A 33×33 one-mip point-sampled texture encodes each texel's coordinates. At the center of the draw, the three samples must return 767, 287 and 544 for (−8, +7), (+7, −8) and (0, 0). Both paths must independently match those values.
With the existing console and PC compilers configured and an SM 6.6 device, run from PowerShell:
Look for the
signed sample offsets: worst relative differenceline and a passing test. The harness reports a skip if the compilers or device are unavailable. The Windows test target was type-checked from Linux. The SDK-dependent differential case above still awaits execution.A separate D3D12 run used the original shader words at
9c7b8e0and a PC vertex shader to draw on an RTX 4090 through Wine 11.22 and vkd3d-proton 3.1. All 256 pixels returned texel 767 at (−8, +7), 287 at (+7, −8), and 544 at (0, 0). An independently compiled PC pixel shader produced the same three values. Microsoft DXIL validation passed for the three translator outputs. The run used a synthetic texture.