graphics: ignore BASE_ARRAY for non-array 1D/2D textures #1963
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!1963
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1963"
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?
@MrFr3di on GitHub · 2026-10-28 16:46 UTC · original
MrFr3di:fix/non-array-base-layer→main· +192 −2 · 2 files · 1 commits · openGame
Ghost of Yotei (PPSA26344, 02.002.000). Texture binding can stop during scene loading with
texture base layer is out of bounds.The renderer uses
BaseArray5()as the starting layer of an ordinary 1D/2D view.For a non-array 1D/2D T#, a nonzero value is incorrectly interpreted as a layer beyond the image's single layer.
Change
kColor1DandkColor2Ddescriptors in the ordinary1D/2D view branches.
BASE_ARRAYfor actual array descriptors, including array T#s accessedthrough an ordinary shader DIM. The decision follows the guest resource type,
not the requested view type.
keys unchanged.
No clamping, null fallback, shader-emitter changes or new Vulkan requirements.
Tests
Renderer regressions use
ResolveTexture → FindTextureand dispatch GPU reads through the returned cached view:BASE_ARRAY=0and3, forIMAGE_LOADandIMAGE_SAMPLE;0→3and3→0, with fresh render contexts;verify that
BASE_ARRAY=1still selects the second layer;words and GPU readback through the same cached view.
The tests do not substitute a manually configured view base layer.
Testing
Windows 11, RTX 3060, clang-cl RelWithDebInfo:
kyty_emulator,shader_recompiler_compute_tests--image-rebind-only--image-overlap-only,--layered-image-only--msaa-storage-only,--storage-yzwx-onlyshader_recompiler_computein CTestBefore the change, the new ordinary 1D/2D cases fail at the layer bounds check, while the array controls pass. With the change, the ordinary cases read layer zero and the array controls retain their selected layer.
Full CTest is not green; the three remaining results are outside the changed
renderer path.
AI use
The implementation and testing were done with Codex.
I reviewed the change myself.
@coderabbitai[bot] on GitHub · 2026-10-28 16:49 UTC · original
No actionable comments were generated in the recent review.
b3a90b59-1a86-47d3-8c1d-be1479e5308eReviewing files that changed from the base of the PR and between
6c01401862andd8fcae8ea2.src/graphics/host_gpu/renderer/pipeline/descriptors.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Walkthrough
TextureViewInfonow uses base layer zero forColor1DandColor2Dtextures, while other texture types useBaseArray5(). GPU tests cover array and non-array textures, sampling and loading, and forward and reverse layer order. They check descriptor preservation, native view selection, backing and cached-view reuse, and GPU read results.Suggested reviewers:
nmzikPriority:
Normal
Change: Bug fix
Merge Risk:
Minimal · up to
d8fcaThis change stops ordinary 1D and 2D texture bindings from failing with an out-of-bounds base layer error, and it keeps array textures selecting their intended layer. The added tests cover the changed behavior. No outstanding merge-blocking risk was found.
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.