Skip to content

docs/design: contract row for the image fetch status VGPR (tfe/lwe), a resident read leaves it unchanged (SHADER-1266-DESIGN-ROW) - #1067

Open
syntaxixr wants to merge 1 commit into
ProjectLeonida:mainfrom
syntaxixr:docs/design-tfe-status
Open

syntaxixr wants to merge 1 commit into
ProjectLeonida:mainfrom
syntaxixr:docs/design-tfe-status

Conversation

@syntaxixr

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: SHADER-1266-DESIGN-ROW (#14 (comment)).

This is the follow-up @aslan2142 named when merging #892: a docs/design.md contract row saying that a resident image_load with tfe leaves the status VGPR unchanged, so the zeroing change does not come back.

The new row, Image fetch status (tfe, lwe) (SHADER-1266), comes right after "Typed image loads" and records:

Tested: every tests/test_docs_*.py and tests/test_i18n_index.py passes (the docs-only CI set), and scripts/check_no_game_data.py docs/design.md is clean. Docs only, no game files. AI-assisted.

…a resident read leaves it unchanged (SHADER-1266)
@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 25, 2026
@PierreEbele

Copy link
Copy Markdown
Contributor

Reviewed 2981ead: ran python3 -I tests/test_image_load_typed.py in the sandbox on both trees (PR 23 OK, main 28 OK, 2 skipped each; PR adds no tests) and a translator probe on both trees. Confirmed that image_load/image_load_mip with tfe/lwe (d32/d16, plus main's coherent glc dlc and 1D_ARRAY paths) leave the status VGPR unwritten. A few items in the new row need fixing before merging: (1) read_before_write_vgprs does not call vgpr_dest_registers(ins, extra=int("tfe" in ins["mods"])) — that call is in interp_copy_sources (tools/rdna2spirv.py:18141, main :18614), where extra=1 counts one VGPR past status ([7, 8, 9] on image_load v[7:8] ... tfe because _mimg_data_count already returns n + 1), while read_before_write_vgprs calls plain vgpr_dest_registers(ins) and does not count the status VGPR for the decoder's lwe form (image_load v7 ... lwe, so a later v8 read is read-before-write); scope that sentence to tfe and fix the function/expression. (2) Under refused forms, a16 image_sample*_o with tfe/lwe translates rather than raising Unsupported (only a16 image_gather4_*_o is refused; a16 2D image_load_mip and image_sample_c_l also refuse tfe/lwe), and cs_imgload_d16_tfe.asm is run via vk_store_test load-d16, not load. (3) docs/design.md conflicts with origin/main, which already has a Resident image_load tfe row (line 446) at the same spot — please rebase and fold this SHADER-1266 detail into that row instead of adding a duplicate. GPU/native checks were not run here (no GPU in sandbox). AI-assisted review.
Recommendation: Fix first

@MoonEyes

Copy link
Copy Markdown
Collaborator

Hi @syntaxixr, thanks for this pull request. It currently conflicts with main (conflicting file(s): docs/design.md), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

@aslan2142 aslan2142 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes before this can land:

  1. Accuracy fix needed in the new row: As @PierreEbele noted on head 2981ead6, read_before_write_vgprs does not call vgpr_dest_registers(ins, extra=int("tfe" in ins["mods"])) — that call is in interp_copy_sources. Please verify and update the code references in the new Image fetch status (tfe, lwe) row against current tools/rdna2spirv.py.
  2. Merge conflict & missing CI: docs/design.md conflicts with current main and no CI checks ran on this head (label cancelled).

Please rebase onto main, fix the code citation, and ensure change-scope and no-game-data pass.

(AI-assisted review.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants