shader: preserve workgroup selection for buffer-backed image tables #1141
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1141
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1141/head"
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?
@Fayberr on GitHub · 2026-10-07 14:09 UTC · original
Fayberr:fix/workgroup-image-table-selection→main· +0 −0 · 0 files · 2 commits · closed without mergingWorkgroup-selected image tables lose their selector when the table comes from a four-word buffer descriptor. They fall through to the whole-buffer scan instead, so padding and unrelated words can become image candidates. The existing
NativeIndirectDispatchfixture hits the indirectImageWriteassertion inResourceMaterialization.cppas a result.Preserve the workgroup selector for buffer-backed tables as well as two-word pointer tables. The materializer already handles both representations. Descriptor reads used for dimensions remain in the shader, and the existing bounds, probe limits and assertions remain intact.
Automated testing performed:
--native-indirect-only; the same existing regression passes with this change, including workgroup-count and image-dimension changes.96eb681b, with the separate BDA fix (#1138) and private MinGW compatibility adjustments. Those changes are excluded from this PR. The submission is based ond2413fc2, whose intervening change does not modify these shader sources.This fixes the existing table-selection regression; gameplay improvements and general support for image writes across different indirect descriptors have not been established.
AI assistance: OpenAI Codex assisted with investigation, the code change and automated testing.
@coderabbitai[bot] on GitHub · 2026-10-07 14:13 UTC · original · edited 2026-10-08 10:14 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
684e0530-8591-4dbe-8e50-54407237c3c1📥 Commits
Reviewing files that changed from the base of the PR and between
d2413fc2ebandbd3fea2c0d.📒 Files selected for processing (1)
src/graphics/shader/recompiler/ir/passes/ResourceTracking.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
Walkthrough
The workgroup-axis selector now takes the retain-reads path regardless of
table_source.dword_count. Other selectors with a two-DWORD source continue to use the existing bounded-selector handling.Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
bd3feNo merge-blocking issue is established for the selector change. Merge after normal checks.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@Nawid3333 on GitHub · 2026-10-07 18:07 UTC · original · reviewed
Tested this on a clean build: Windows 11, clang-cl 19.1.5, Release, AMD RX 9070 XT. This PR
(
bd3fea2c) vsmaind2413fc2, fullctest(53 tests) and all 107--xxx-onlymodes ofshader_recompiler_compute_tests:--native-indirect-only:mainexits with theindirect_rootEXIT_IFinResourceMaterialization.cpp(exit code 321); with this PR it passes.--lds-limit-onlychanges the same way.
shader_recompiler_computeandcompute_meta_clear_classificationno longer abort there. Onthis GPU each now stops at a check that
mainalready fails in other tests:shader_recompiler_compute:image.cpp:721withformat=129(D24_UNORM_S8_UINT, which thisdriver doesn't support), the same failure as five texture-cache tests on
main(#930 isabout that format).
compute_meta_clear_classification:RenderExecutorStencilBindingDiscovery, the samefailure
--image-rebind-onlyhas onmain.main.So on AMD it removes the abort without changing anything else I could measure.
@Fayberr on GitHub · 2026-10-08 10:17 UTC · original
Closing as superseded. The relevant regression tests pass on upstream without this patch, and this PR now has no remaining changes.
Pull request closed