Repository navigation
Conversation
A pixel stage can read the exact GFX10 width, height and 3D depth fields of an image descriptor as numbers. Other words and uses stay refused. Fixes part of R0Y00#2022 Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
A pixel size-field read uses the dimension of the descriptor load the image instruction reads. Another load into the same SGPRs does not borrow it. A copy of the sampled words still does. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Resolved: tools/startup/gfx2hlsl.py (Pipeline SRV declarations: kept main's texcube entry and this branch's img_<component>_<kind> helper loop).
…-numeric Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com> # Conflicts: # tools/startup/gfx2hlsl.py
s_lshr_b32 of a size field lowers only when the descriptor word is the value being shifted. A size-field SRV is marked imagedim, and the draw path refuses that view when MostDetailedMip is not 0. Sampling a shifted view that does not read a size field is unchanged. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Change
Replacement for #3225: this PR carries the pixel-stage GFX10 image-descriptor size-field lowering and addresses the outstanding review feedback on descriptor-load provenance, swapped
s_lshr_b32operands, and views whose first mip is not resource mip 0. It adds regression controls for ans_load_dwordx16upper image, overwritten descriptor words, and branched code, and registers the control test in the Windows PR CTest preset. The original #3225 remains open; updating its author-owned head failed with HTTP 403, so this is a separate replacement submission, not a request to merge or close either PR. Refs #3225.Verification
Passed locally:
python -B tests/startup_gfx2hlsl_image_desc_word_check.pypython -B tests/startup_image_sample_l_check.pypython -B tests/startup_gfx2hlsl_cselect_descnum_check.py(includes expected negative-control mutant failures; check exits successfully)python -B tests/startup_gfx2hlsl_load_desc_check.pypython -B tests/startup_gfx2hlsl_scalar_m0_check.pypython -B tests/startup_gfx2hlsl_image_get_lod_check.pypython -B tests/startup_tools_lint_check.py tools/startupgit --no-pager diff --check origin/main...HEADctest --preset pr -N -R '^startup_gfx2hlsl_image_desc_word_controls$'reportedTotal Tests: 0: this worktree has no configured dev CTest build, so the registered CTest was not run locally. On this PR's commit, GitHub Actions currently has three jobs pending (Build and test on Windows,Assemble and translate gfx1013 fixtures, andRun platform-independent Python checks on Linux);Build and test on Windows at /O2is skipped. GitHub reportsmergeable=true,mergeable_state=blocked; the three pending jobs are the visible blocker.Evidence and follow-up
The new controls extend the repository's source-built image-sample fixture with synthetic instruction encodings; no game files or external samples are used. Negative controls ensure nonmatching/unsafe descriptor reads remain refused. The behavior and reproduction command are documented in
docs/experiments.md; local GPU draw validation was not run.Checklist
If this change was AI-assisted, say so in the description. Recent contributions follow this practice.
AI-assisted.