Skip to content

feat(agc): sample texture format 43 through a lossless B10G11R11 copy - #7271

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
gjonn:feat/agc-format43-native-repack
Oct 18, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
gjonn:feat/agc-format43-native-repack

Conversation

@gjonn

@gjonn gjonn commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

What

Sampling a texture of format 43 (10_11_11 float) is refused on main ("samples or gathers a converted float image, or queries its LOD, which is not implemented"). This PR makes it sample natively, including at any LOD and from cube faces.

Format 43 holds unsigned floats of 10 bits (R, bit 0), 11 bits (G, bit 10) and 11 bits (B, bit 21). VK_FORMAT_B10G11R11_UFLOAT_PACK32 holds R11 at bit 0, G11 at bit 11 and B10 at bit 22. So if the guest R field goes into the Vulkan B field and the guest B field into the Vulkan R field, every texel moves without changing a bit of any component. A sampled format-43 texture is now uploaded that way: a repack pass runs over the detiled words (TextureRepack.comp), and the view swaps R and B back (TextureComponentChannel). The hardware sampler then filters it like any other float texture: point and bilinear, every mip level and LOD, and cube faces.

If a storage image still holds the texture's results, the texture is copied from that image (vkCmdCopyImageToBuffer, the repack pass, vkCmdCopyBufferToImage) and copied again whenever the image changes, as the depth and block copies are. The recompiler treats a sampled format-43 image as a float image with no conversion. Storage reads and writes keep the packed R32_UINT path. A 3D texture whose results are still in a storage image is flushed and uploaded instead.

Stops at: format 43 only. The other converted formats (11_11_10 unorm and the like) are unchanged.

Relation to open #5958 (converts converted unorm and float images in the shader): the two PRs complement each other. After this PR, format 43 no longer needs #5958's in-shader conversion, and #5958 is still needed for the other converted formats. They do interact in one test. If both merge, the #5958 test that expects its 8-bit-grid bilinear result for format 43 (1.693848) would need to drop that expectation, because native filtering gives 1.694336. Native hardware filtering is what the console's TMU does, so the native value is the exact one.

Tests:

  • ImageRepackedFloat (new GPU test): image_sample_l of a mipmapped format-43 texture at each LOD, plus image_load of mip 0. Cube-face samples are compared with a native B10G11R11 cube that holds the same texels, plus image_load of cube face 0.
  • TextureFormat (CPU): format 43 is sampled as B10G11R11_UFLOAT and stored as R32_UINT. Every R, G and B field value read through the repacked word and the swapped channel gives back the same bits and the same float, including Inf, NaN and denormals.
  • ImageConvertedUnorm: point image_sample_lz of R10_G11_B11_FLOAT was expected to be refused and now returns the texel values. The test also samples it while the results are still on the GPU (from the storage image).

Tested

Windows 11, NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92. Ninja/MinGW Release with BUILD_TESTING=ON, on current main (bd56fa6).

The test was failing before the change: I built main without the change, adding only this PR's test files. Two of those files call helpers this PR adds (IsRepackedTextureFormat, RepackTextureWord), so on main they do not compile:

tests/TextureFormat.cpp:116:13: error: 'IsRepackedTextureFormat' was not declared in this scope
tests/execution/ImageRepackedFloat.cpp:190:130: error: 'RepackTextureWord' is not a member of 'AgcDriver::Graphics'

To get runtime failures, I swapped in local copies of the two helpers (the bit swap only) for the main run:

agc_driver_image_converted_unorm ...***Failed
  ShaderRecompiler::Recompile: samples or gathers a converted float image, or queries its LOD, which is not implemented
agc_driver_image_repacked_float ....***Failed
  ShaderRecompiler::Recompile: samples or gathers a converted float image, or queries its LOD, which is not implemented
agc_driver_graphics ................***Failed
  AGC graphics: format 43 must be sampled as B10G11R11_UFLOAT and stored as R32_UINT

With the change:

1/3 Test #344: agc_driver_graphics ................   Passed
2/3 Test #501: agc_driver_image_converted_unorm ...   Passed
3/3 Test #515: agc_driver_image_repacked_float ....   Passed
100% tests passed out of 3

tools/check_conventions.py --base origin/main and tools/check_test_registration.py are clean.

PPSA01317 on main: boot used to abort on its format-43 sampling, a mipmapped format-43 texture sampled at a LOD other than 0 and a format-43 cube map. With this PR it gets past both and runs to about 49 s into boot.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (complementary to feat(shader): sample converted unorm images in the shader #5958, see above)
  • Fixes: none
  • Unblocks: PPSA01317 Gran Turismo 7 (PPSA01317) #4697
  • GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92, Windows 11
  • AI-assisted: yes

Texture format 43 holds unsigned floats of 10 bits (R, bit 0), 11 bits
(G, bit 10) and 11 bits (B, bit 21). VK_FORMAT_B10G11R11_UFLOAT_PACK32
holds R11 at bit 0, G11 at bit 11 and B10 at bit 22, so storing the
guest R field in the Vulkan B field and the guest B field in the Vulkan R
field moves every texel without changing a bit of any component. A
sampled texture of format 43 is now uploaded that way (a repack pass over
the detiled words, TextureRepack.comp) and viewed with R and B swapped
back (TextureComponentChannel), so the shader samples it natively: point
and bilinear filtering, every mip level and LOD, and cube faces
work as for any other float texture. A texture whose results a storage
image still holds is copied from that image (vkCmdCopyImageToBuffer, the
repack pass, vkCmdCopyBufferToImage) and copied again whenever the
image changed, like the depth and block copies. The recompiler treats a
sampled format-43 image as a float image without conversion; storage
reads and writes keep the packed R32_UINT path, and a 3D texture whose
results are still in a storage image is flushed and uploaded instead.

PPSA01317 samples a mipmapped format-43 texture at a LOD other than 0
and a format-43 cube map during boot.

AI-assisted: yes
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6218 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp L227-228, L246
PR 6905 core/libs/prx/libSceAgcDriver/CMakeLists.txt L236
core/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hpp L85
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp L7, L117

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 907 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4650 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 4891 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5426 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 5958 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/execution/ImageConvertedUnorm.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 5998 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5999 docs/dev/debt/libSceAgcDriver.md
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6054 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/TextureFormat.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureFormat.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6082 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6176 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6182 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6222 docs/dev/debt/libSceAgcDriver.md
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6232 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6259 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6320 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6360 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6373 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6414 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6472 docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6488 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6490 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6492 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6498 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6503 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6535 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6553 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6563 docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6674 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6763 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6783 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6786 docs/dev/debt/libSceAgcDriver.md
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6881 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6971 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6972 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp
core/libs/prx/libSceAgcDriver/tests/TextureFormat.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6989 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6995 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7154 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7258 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7261 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7426 docs/dev/debt/libSceAgcDriver.md

@github-actions github-actions Bot added build shader core/shader docs agc libSceAgc* labels Oct 17, 2026
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
@frankea

frankea commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

RTX 4090 data point on PPSA01317, on top of my #7254 / #7256 runs (same stack, same box), where the title stopped on samples a converted float image that is not a 2D or 2D array view while sampling the 10_11_11 float cube map it had just rendered. Short version: with this PR that sample goes through on this GPU too, 3 of 3 runs, and the next stop is a limit of #5958 itself (sampling of a converted image is implemented only with wrap or clamp-to-edge addressing), which no open PR covers.

Setup. Gran Turismo 7 PPSA01317 01.000.001 (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release libs target only (no tests built). app.exe is the relink from main 31cbb55 (--windows --registry --module-dir .); only libs/ is swapped between runs. Tree: the #7256 stack (main 5f8d2a2 + #7137 2aa6bfc + #7207 ec28b6b + #7175 555b7e8 + #5958 87a9b8d + #7243 da158d6 + #7238 4aaf276 + #7240 7c19c66 + #7254 ebe289b + #7256 5589752, b81f69024) merged with this PR's head 571feca (7bc6cf432). One conflict, in tests/execution/ImageConvertedUnorm.cpp, the #5958 test this PR edits; the PR's version was taken, and the file is not compiled here. The libSceSsl.prx is the one from #7319 (1f26755). No controller, no input, nobody at the keyboard; one-shot interactive task per run, 600 s cap, box otherwise idle.

Result. Run 1 recompiled the shader cache (the recompiler source changed), runs 2 and 3 were warm. All three get past the cube sample: splash, the black loading screen with the GT spinner (title-bar counter 30 FPS, 1,150 frames at the last capture of run 3), save data mounted, three sceNetResolverStartNtoa -> host DNS lookup failed, 392 further shaders registered, one new warning (texture 0x123fe90000 (format 22) has mixed DCC keys at 0x1240610000; its texels are read as stored), and then, identically every time:

[gpu] driver failure: compute shader 0x1258d69600: sampling of a converted image is implemented only with wrap or clamp-to-edge addressing
[videoout] presentation failed: compute shader 0x1258d69600: sampling of a converted image is implemented only with wrap or clamp-to-edge addressing
terminate called after throwing an instance of 'std::runtime_error'
  what():  compute shader 0x1258d69600: sampling of a converted image is implemented only with wrap or clamp-to-edge addressing
FATAL: abort() (SIGABRT) on thread 6072

That is #5958's ResourceMaterializer.cpp throw for a converted image (one of the formats this PR leaves to #5958) sampled with clamp-to-border or mirror addressing, so on this box the open-PR chain for the title ends here until #5958 takes those address modes. No format-43 refusal of any wording, no ImageRepack or copy failure, no device loss.

run shader cache exit after stop
stack without #7271 (#7256 comment, 3 runs) warm 35 to 37 s shader 0x1258d31800 stage 5: samples a converted float image that is not a 2D or 2D array view
1 cold (2,020 misses) 42 s compute shader 0x1258d69600: sampling of a converted image is implemented only with wrap or clamp-to-edge addressing
2 warm 35 s same
3 warm 36 s same

The chain on this box tonight, all on a libs built from the stack above: #6350 crash (#7137) -> sceSslConnect (#7319) -> 11_11_10 blend (#7243) -> dynamic-mip storage image (#7238) -> unnormalized sampler (#7240) -> layered colour view (#7254) -> layered depth view (#7256) -> converted float cube sample (this PR) -> #5958's addressing limit.

stderr of run 3 (warm, box idle) from the second 10 s summary to the abort, the 392 per-shader ShaderRegistry lines removed
[log] 10.0 s: 190 lines (18 stdout, 172 stderr), 26.6 KiB written, 0 repeats coalesced; callers spent 0.36 ms queueing and formatting (0.004% of one thread), logger thread 77.29 ms, queue peak 2.7 KiB
[SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0
[SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000
[shader-disk-cache] (10 s): 118 hits, 0 misses, 0 writes (0.0 MiB), 0 load failures, 0 write failures; resource plans: 112 hits, 0 misses, 0 writes, 0 load failures; 12.6 MiB read in 25.3 ms (totals: 1792 hits, 0 misses, 0 writes; plans 1760 hits, 0 misses)
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[gpu] texture 0x123fe90000 (format 22) has mixed DCC keys at 0x1240610000; its texels are read as stored
[log] 10.4 s: 706 lines (314 stdout, 392 stderr), 93.0 KiB written, 0 repeats coalesced; callers spent 1.86 ms queueing and formatting (0.018% of one thread), logger thread 88.91 ms, queue peak 2.4 KiB
[gpu] driver failure: compute shader 0x1258d69600: sampling of a converted image is implemented only with wrap or clamp-to-edge addressing
[videoout] presentation failed: compute shader 0x1258d69600: sampling of a converted image is implemented only with wrap or clamp-to-edge addressing
terminate called after throwing an instance of 'std::runtime_error'
  what():  compute shader 0x1258d69600: sampling of a converted image is implemented only with wrap or clamp-to-edge addressing
FATAL: abort() (SIGABRT) on thread 6072

AI-assisted: yes (Claude Code)

@oneandonlydean
oneandonlydean merged commit ed01d79 into boykopovar:main Oct 18, 2026
10 checks passed
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
ps54all pushed a commit to ps54all/AnyPS5 that referenced this pull request Oct 18, 2026
10_11_11_UNORM (format 30) images are read and written through an
R32_UINT view, so the hardware sampler cannot filter them. image_sample
of a 2D or 2D array view now fetches the one or four texels at LOD 0,
decodes them and blends them in the shader, with bilinear weights on
the 8-bit grid, for point or bilinear filtering with wrap or
clamp-to-edge addressing.

A shader gets the converted sample mode only after a converted
descriptor reaches one of its sampled images: that capture throws
ConvertedSampleRequired and the driver prepares the program again
with GuestContext::convertedSamples.

The R10_G11_B11 float format is sampled natively since boykopovar#7271 and keeps
its refusal on the converted path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 18, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
alex73630 added a commit to alex73630/AnyPS5 that referenced this pull request Oct 19, 2026
Adopt Gjonn PR boykopovar#7271 with exact R10_G11_B11 repacking, native sampled views and storage-copy refreshes. Remove obsolete software sampler modes for native views, preserve independent 3D Z filtering, account retained copies against the sampled budget and use pooled allocation recovery. Test native filtering bit-for-bit against format 36 while retaining the converted volume and UNORM oracles.

Validated on NVIDIA RTX 3070, Linux, driver 615.78.08: repacked and converted image tests, plus 71 selected regressions. The separate BDA stress-test failure from draft boykopovar#5859 remains under investigation.

Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants