Skip to content

Test position interpolation for both conservative depth outputs - #2

Open
MichaelSmithAI wants to merge 1 commit into
SAitken91:shader/conservative-depth-positionfrom
MichaelSmithAI:test/conservative-depth-position
Open

MichaelSmithAI wants to merge 1 commit into
SAitken91:shader/conservative-depth-positionfrom
MichaelSmithAI:test/conservative-depth-position

Conversation

@MichaelSmithAI

@MichaelSmithAI MichaelSmithAI commented Nov 24, 2026 •

Copy link
Copy Markdown

This test exercises the position interpolation rule changed in upstream #565. The original PR reports 14 additional title pixel shaders passing validation, including PS_OctaSLODReZ.

The fixture runs at pixel frequency. Its original three-dword pixel shader writes position Z to depth and has no sample-index input. The fixture runs it through the production emitter with each of the three depth output signatures and reads the position input back from the emitted DXIL pipeline validation data (PSV0).

Depth output Expected position interpolation
SV_DepthLessEqual No-perspective centroid (5)
SV_DepthGreaterEqual No-perspective centroid (5)
SV_Depth No-perspective (4)

On the parent revision the less-equal case emits 4 and the assertion fails. At c249f02 all 57 Linux shader library tests pass with the regression. Microsoft DXIL validation also accepted the three synthetic outputs during development. The checked-in test runs without a GPU, shader SDK or title files:

cargo test --locked -p victory-shader --lib conservative_depth_uses_centroid_position

This is a test-only change. The title validation count is from the original author. Rendering impact remains unmeasured. AI assistance was used to develop and verify the fixture.

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