mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:15:52 +01:00
[PR #110] [CLOSED] rdna2spirv: a plain image_sample reads a UINT/SINT image in every dimension and stage (SHADER-1404) #162
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#162
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/110
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/9843📝 Commits (1)
1c08f38rdna2spirv: a plain image_sample reads a UINT/SINT image in every dimension and stage (SHADER-1404)📊 Changes
3 files changed (+96 additions, -15 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
tests/semantic/test_sample_typed_dims.py(+81 -9)📝
tools/rdna2spirv.py(+14 -5)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):SHADER-1404, claimed in
#9677: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116572064What
image_sample(no LOD dword) took the UINT/SINT typed read only in the pixel shader's 2D form. Two cases still read an integer image through the float view, so the VGPRs held a converted float instead of the integer texel:The hardware picks the view from T# FORMAT in every dimension and stage. EGEN-SAMPLE-TYPED-DIMS (
4dcb96e44) already fixedimage_sample_l/image_sample_lz; this PR covers the plain form.How
image_samplenow goes through the sameimage_read_typeddispatch as the explicit-LOD forms:The
_b,_c*,_d,_cland_oforms are unchanged.Tests
tests/semantic/test_sample_typed_dims.pygets a new class,ImplicitSampleTypedDims, that checks every dimension in a PS and in a CS:Lod %f0and no derivatives in the CS;spirv-val --target-env vulkan1.2passes on every module.Without the translator change, 18 of the new subtests fail. The PS 2D case passes both ways, since that form was already typed.
What I ran, on macOS 26 with an Apple M4 (CPU only) and Python 3.12.13:
python -I scripts/run_semantic_tests.py -j 4 tests/semanticgives 459 files and 6,050 tests. Two files fail,test_exec_computedandtest_image_atomics_guard, and both fail the same way onmain2d53a8055.tests/test_design_contract_rows.py,test_docs_table_rows.pyandtest_semantic_translator_use.pypass.test_docs_repeated_lines.pyandtest_docs_repo_paths.pyfail the same way onmain, on files this PR doesn't touch (tests/semantic/README.md,docs/retail_boot_intel_host.md).scripts/check_no_game_data.pypasses on the changed files.Not GPU-verified. A pixel readback on a non-2D integer texture is still missing; the design row says so. The existing 2D fixtures,
ps_sample_implicit_uintandps_sample_implicit_sint, take the same path. No game files were used.AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.