Skip to content

xshader: lower cube-image samples with a LOD clamp - #250

Open
s3rius wants to merge 2 commits into
brcly:mainfrom
s3rius:xshader/cube-sample-lod-clamp
Open

s3rius wants to merge 2 commits into
brcly:mainfrom
s3rius:xshader/cube-sample-lod-clamp

Conversation

@s3rius

@s3rius s3rius commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR lets the translator lower a cube image sample with an explicit LOD clamp (image_sample_cl / image_sample_b_cl) instead of refusing it, using TextureCube::Sample/SampleBias with a trailing clamp. SampleGrad on a cube with a clamp remains refused because no such TextureCube overload exists; the refusal reason is unchanged. Regression tests in the translator cover the lowered plain and derivative cases.

Verified on Lanes

A pull request is not merged until Lanes passes on a GPU. Run:

python tuxbox.py check
  • python tuxbox.py check passed on this branch
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below

GPU, driver and backend:

  • This changes code both vendors run, and the check passed on an AMD and an NVIDIA card (why). Otherwise, say which vendor still needs to run it:

Paste the summary printed at the end:

Checks

CI runs the Python unit tests, the shader compiler, DXBC, and XG layout tests, and a Windows typecheck of tuxbox-d3d12.

If this pull request changes evidence JSON, regenerate the results table and the progress map and include both files:

python tuxbox.py status > docs/RESULTS.md
python tuxbox.py status --svg docs/progress.svg

@s3rius
s3rius marked this pull request as draft November 26, 2026 17:05
@s3rius
s3rius force-pushed the xshader/cube-sample-lod-clamp branch from 561e834 to 8425b58 Compare November 26, 2026 19:28
Signed-off-by: Pavel Kirilin <s3riussan@gmail.com>
Signed-off-by: Pavel Kirilin <s3riussan@gmail.com>
@s3rius
s3rius force-pushed the xshader/cube-sample-lod-clamp branch from 8425b58 to 03cd9ff Compare November 26, 2026 19:29
@s3rius
s3rius marked this pull request as ready for review November 26, 2026 19:32
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