fix(agc): round 16-bit float image stores toward zero #8998
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8998"
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?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T09:08:06Z.
What
Use a UINT storage-image view for write-only 16-bit float formats and convert each stored component with the existing round-toward-zero float-to-half routine. This preserves negative values, infinities and NaNs, and saturates finite overflow as observed on the AMD hardware documented in #8282. Add execution coverage for 16_FLOAT, 16_16_FLOAT and 16_16_16_16_FLOAT, including edge values and component masks. The follow-up binds UINT-compatible views for these converted formats while retaining native SFLOAT views for float bindings. This update also binds a compatible UINT view for multisampled float16 targets and restores the existing two-argument StorageView call sites after rebasing on current main.
Tested
ninja -C build agc_driver_sample_multisample_target_testssucceeds on updated head7081834388.agc_driver_sample_multisample_targetstops before test initialization because this host CPU lacks BMI1, BMI2, LZCNT, MOVBE, AVX2 and FMA. The test therefore did not reach Vulkan validation.7081834388cleanly merged ontomainb00235dda0.agc_driver_sample_multisample_targetandagc_driver_image_store_float_roundingeach pass 3/3 without validation and 3/3 withVK_LAYER_KHRONOS_validation; the focused validation runs report 0VUID-lines. Adjacent native-MSAA, image conversion/repacking and depth-storage tests also pass 3/3 in both modes.708183438:agc_driver_image_store_float_roundingpasses 3/3. The multisample target test is skipped because MoltenVK does not exposeshaderStorageImageMultisample. With the production change reverted and the new test retained, the float16 rounding test fails at0x7e00where round-toward-zero expects0x7e09, confirming the host rounding difference this path handles.python3 tools/check_conventions.py --base upstream/mainpasses.python3 tools/pr_overlap.py --branch codex/f32-image-store-rtz-8282reports shared graphics files in other open PRs, including #6218, #8716 and #8792; their topics are packed storage images, shader emitter performance and image atomics, respectively. No dependency is identified.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T09:17:54Z.
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
agc_driver_image_array_window_past_layer_limit(Failed)agc_driver_image_store_float_rounding(Failed with:image_store of 16_FLOAT: texel (1, 0) component 0 is 0, expected 15360)It seems the 16-bit floating point rounding towards zero logic is prematurely truncating or zeroing out the store on RDNA3/RADV. Needs a revision!
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T09:22:28Z.
Thanks for running this on RADV. The
16_FLOATfailure is a real regression in the new path; I am tracing why the converted UINT storage view writes zero for the0x3f801000input instead of0x3c00. I cannot reproduce the GPU run on my current host (its CPU lacks required ISA features, so the test exits during initialization). I will update this PR with the fix and validation; the separateimage_array_window_past_layer_limitfailure is being checked independently.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T09:29:44Z.
I found the cause in the descriptor view path: the converted shader emitted UINT texels, but
StorageTexture::StorageViewonly created UINT-compatible views for signed formats. A float16 descriptor therefore reached the shader through its native SFLOAT view. Commit268bfc012fnow selects the UINT view for the UINT storage-image binding and keeps the native float view for float bindings; the view mapping covers R16, R16G16 and R16G16B16A16 SFLOAT. The focused test target builds on Linux, and conventions plusgit diff --checkpass. I cannot run the Vulkan test on this host because its CPU lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA, so the GPU result on the new head is still needed. When convenient, could you rerun the focused test on this head and report results for all three formats? The existingimage_array_window_past_layer_limitfailure is also still untriaged from the output here; its first failing assertion would help isolate it.Imported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T09:37:58Z.
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
268bfc012fa:agc_driver_image_store_float_rounding: Passed successfully (float16 / R16, R16G16, R16G16B16A16 storage view formats behave correctly with the new UINT selection).agc_driver_guest_memory_lifetime: Failedagc_driver_image_array_window_past_layer_limit: Failedagc_driver_sample_multisample_target: Failedagc_driver_tessellation: SEGFAULTImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T09:39:04Z.
The overlap report is valid: #8716 touches the
StoreTexelSINT conversion guard, and #6218 changes storage-format materialization inResourceMaterializer.cpp. Their purposes are separate from this PR's write-only 16-bit-float storage path; #8998 does not depend on either one. If one merges first, I will resolve any textual conflict against the updatedmainand rerun the focused validation. I have not marked a dependency because neither change is required for this fix.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T09:41:13Z.
Thanks for rerunning the corrected head. The focused pass on the RX 7900 XTX confirms the UINT storage-view fix for all three float16 formats; I updated the PR description with your exact-head result. I recorded the other test failures separately and am not attributing them to this change without their first failing assertions.
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-21T10:17:57Z.
An AMD proprietary-driver run, with the red control. Radeon 860M (RDNA 3.5,
1002:1114), AMD Windows driver 32.0.13058.8001, Windows 11 26300, WinLibs GCC 15.2.0, Release,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, full builds, three runs each.Edit: an earlier version of this comment read the row-1 failure below as a Windows write-back difference. That was wrong; the test's expectation for the masked component is what fails.
As written, the test fails the same way on
mainand on this PR:Row 1 stores with
dmask0x5. For a two-channel format, component 1 isn't in the mask, andExpectedComponentexpects it to keep the 0x5a5a fill. The hardware writes zero there instead. ACO'svisit_image_storesays so (Mesa 24.2,src/amd/compiler/aco_instruction_selection.cpp):ACO relies on this to drop constant-zero components from the store's
dmask.main'sImageConvertedUnormimage_store dmask:0x5case already expects zero for the missing component.StoreTexelalso passes 0 for unselected components, so AnyPS5 matches GFX10. SoExpectedComponentshould return 0 for a component outsidedmask, not 0x5a5a. I can't reconcile that with the RADV pass reported above: ACO zeroes that component as well.With that one line changed (
return 0u;instead ofreturn 0x5a5au;, locally, not pushed):agc_driver_image_store_float_roundingmain27fabb6b7d+ the test from268bfc012fmain27fabb6b7d+ this PR at268bfc012f(clean merge)So on AMD's Windows driver the host's f32→f16 storage conversion already gives the round-toward-zero results for every edge value in the test, including 65520 → 0x7bff and the NaN payloads. The red control isn't red here, and the PR changes nothing on this driver. It is still needed wherever the host rounds to nearest. A red run on RADV or NVIDIA with the corrected expectation would show that.
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-21T11:29:38Z.
@MarcZX10 I corrected my earlier comment above. The row-1 failure isn't a Windows write-back difference: the test expects the component outside
dmaskto keep 0x5a5a, but GFX6–11.5 hardware writes zero there (ACO'svisit_image_store), asImageConvertedUnorm'sdmask:0x5case already expects. With that expectation changed to 0, the test passes 3/3 on AMD's Windows driver onmainand with this PR, so this driver already rounds toward zero and the red control has to come from a host that rounds to nearest.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T11:54:21Z.
Fixed in follow-up commit 3764883214: the execution test now expects zero for components omitted by the dmask, matching the behavior documented for this hardware generation and the existing ImageConvertedUnorm case. The focused target builds successfully on my Linux host. I attempted the CTest run, but this machine lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA, so the test aborts before Vulkan initialization; no local GPU result is claimed. Hosted conventions, eligibility, labels and report checks are pending for the new head.
Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-21T12:27:15Z.
RDNA 2 measurement behind
3764883214(zero for the components outsidedmask).Raw ISA on an RX 6700 XT (gfx1031) through the HIP runtime of AMD's Windows driver 32.0.21045.5002:
0x5a.image_storeran perdmask, from 0x1 to 0xf, with data (0.25, 0.5, 0.75, 1.0) inv[4:7].With the swizzles this test uses (0xfac for one and four channels, 0x22c for two):
dmaskread 0, never the0x5afill.This holds for
16_FLOAT,16_16_FLOATand16_16_16_16_FLOAT, and also for16_16_UNORM,8_8_8_8_UNORM,32_FLOAT,32_32_FLOATand32_32_32_32_FLOAT. For example,16_16_FLOATwith swizzle 0x22c,dmask0x5 and data (0.25, 0.5) stores 0x00003400. Component 1 is 0, and the 0.5 meant for component 2 is dropped.A side observation that doesn't affect this test: under 0xfac, a two-channel format writes component 1 from data component 3 (W) and ignores data component 1.
16_16_FLOATwithdmask0x3 stores 0x00003400, and withdmask0x9 and data (0.25, 0.5) it stores 0x38003400.StoreTexeltakes component 1 from data component 1 for that swizzle.Imported from boykopovar/AnyPS5. Originally posted by gdols on 2026-10-21T14:26:30Z.
NVIDIA, Windows. GeForce RTX 3080, driver 616.92, Windows 11 Pro 26300, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7, Release,
main80565c594(+ #8310 to build), this PR at 3764883214.ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1; the focused runs also underVK_LAYER_KHRONOS_validation(SDK 1.4.363.0, inserted in each run perVK_LOADER_DEBUG=layer).Build. This PR doesn't build on current
main. #8975, merged after this PR's base27c88a8d7, addedresident->StorageView(0, false)toRunDepthCopyPass, and this PR givesStorageViewa third parameter:The merge is textually clean, so GitHub shows no conflict. For the runs below I passed
falsethere locally:DecodeDepthCopyPassrequiresVK_FORMAT_R32_SFLOAT, for whichmainalready returns the native view.Red control on NVIDIA.
main+ onlyImageStoreFloatRounding.cppfrom this PR:agc_driver_image_store_float_roundingpasses 3 of 3, with no validation messages. As on AMD's Windows driver, the red control has to come from a host that rounds to nearest.With this PR: the same test passes 3 of 3, with no validation messages.
Regression.
agc_driver_sample_multisample_targetfails 10 of 10 with this PR and passes 10 of 10 onmain:Under the layer it logs 8
VUID-vkCmdDispatch-format-07753messages, none onmain:From the code:
rawFloat16StorageinResourceMaterializermakes every write-only 16-bit float storage image UINT, whatever its dimension, but ak2DMsaastorage texture gets its view fromMultisampleTargetStorageView(ShaderResources.cpp:4716onmain), which this PR doesn't change and which returns the nativeSFLOATview. That may also be theagc_driver_sample_multisample_targetfailure in the RADV run in the description.^agc_:main870 passed, 3 skipped, 3 failed (876 tests); this PR 870 passed, 3 skipped, 4 failed (877, with the new test). The three failing on both areagc_driver_sample_order*, fixed by #9056; the fourth is the one above.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MaxLikesCode on 2026-10-21T16:53:55Z.
Confirming @gdols's results on a second NVIDIA card, an RTX 4090 (Ada), at head
376488321merged ontomaincecb540a6, with the same one-argument change atDraw.cpp:2979(resident->StorageView(0, false, false)) so that it builds:agc_driver_image_store_float_roundingpasses 6 of 6 (3 runs without, 3 with the validation layer), noVUID-.agc_driver_image_repacked_float,agc_driver_image_converted_unormandtexture_format_lookuppass 6 of 6 onmainand with this PR, andagc_driver_depth_storage,_dispatchand_reuse(the #8975 depth-copy path) pass 3 of 3 under the layer with thatfalse.agc_driver_sample_multisample_targetregresses here too: 6 of 6 onmain, 0 of 6 with this PR (sample 1 of pixel (0, 0) does not hold the stored color into one sample of each pixel of the drawn target). Each validation run logs the same 8VUID-vkCmdDispatch-format-07753messages,requires UINT component type, but bound descriptor format is VK_FORMAT_R16G16B16A16_SFLOAT, andmainlogs none.NVIDIA GeForce RTX 4090, driver 617.42, Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,ctest --test-dir build -R <tests> -V. Validation runs addVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Vulkan-ValidationLayersvulkan-sdk-1.4.363.0, implicit layers disabled); the loader log shows the layer inserted in every Vulkan test process, and no log haswas not found but was requested by env var VK_INSTANCE_LAYERS.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T17:06:24Z.
Thanks for the careful repro on both NVIDIA cards. I’ve pushed commit
7081834388to address both findings: the existing two-argumentStorageViewcall now defaults to the native view, and the multisample storage descriptor uses the UINT-compatible view with storage-only view usage when the binding is in the converted float16 range. The multisample image enables mutable and extended usage and checks UINT storage support at its sample count.The updated head builds
agc_driver_sample_multisample_target_testson Linux. I attempted the focused CTest run withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_LAYER_KHRONOS_validation, but this host exits before Vulkan initialization because it lacks BMI1, BMI2, LZCNT, MOVBE, AVX2 and FMA. Could you rerunagc_driver_sample_multisample_targetandagc_driver_image_store_float_roundingon7081834388with validation enabled and share the pass counts and any VUIDs?Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-21T18:43:50Z.
AMD Windows rerun at
7081834388, as asked above, merged ontomainb00235dda0(clean merge). For comparison I also ranmainalone and the earlier head376488321, merged the same way with the one-argumentDraw.cpp:2979change it needs to build (StorageView(0, false, false)).RX 6700 XT (gfx1031), AMD Windows driver 32.0.21045.5002, Windows 11 26200, MinGW GCC 15.2 Release,
ANYPS5_REQUIRE_VULKAN=1.VK_LAYER_KHRONOS_validation.ANYPS5_NO_SHADER_CACHE=1.VK_LOADER_DEBUG=layershows the layer inserted in every Vulkan test process, with no "was not found" line.Each cell gives the plain runs, then the validation runs:
main3764883217081834388agc_driver_sample_multisample_targetagc_driver_image_store_float_roundingmainagc_driver_native_msaa_vertex_input,agc_driver_image_repacked_float,agc_driver_image_converted_unorm,texture_format_lookup,agc_driver_depth_storage,_dispatch,_reuseVUID-lines over the 3 validation runsAt
376488321the multisample test fails here as on NVIDIA:Each validation run logs 16
VUID-vkCmdDispatch-format-07753(requires UINT component type, but bound descriptor format is VK_FORMAT_R16G16B16A16_SFLOAT). The plain runs stop at the first failure.At
7081834388both are gone. The test's store case passes: "stores to one sample of each pixel of a drawn 4x target and to samples of zeroed color memory no draw rendered to reach exactly those samples".Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-21T22:45:36Z.
Review: COMMENTED
The red control you were missing, from a round-to-nearest host: Apple M2 Max (Metal via MoltenVK).
Machine: Apple M2 Max (
vendor=0x106b device=0x1b020208, subgroup 32), macOS 27.2, x86_64 under Rosetta 2. MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0). Release,BUILD_TESTING=ON.Base/method: PR #8658
feat/macos-port@4ebe71f2e5(currentmain0c6a5bd593+ the macOS port), notmain. This PR (708183438) applied on top, clean, on its own (not stacked with other image PRs).With this PR:
agc_driver_image_store_float_roundingpasses 3/3 (--repeat until-fail:3),image store float rounding tests passed. Because the write-only 16-bit-float store now converts to f16 in the shader and writes through the UINT view, the rounding is done in SPIR-V and is independent of the host's native image-store rounding.Red control (round-to-nearest host): with only this PR's production files reverted to base and the new test kept — so the store goes back through the native
SFLOATview and Metal rounds the texel — the test fails:i.e. Metal stored
0x7e00where round-toward-zero wants0x7e09. So on this GPU the native path does not round toward zero, which is the case the RADV and AMD/NVIDIA-Windows runs above could not exercise, and the test does catch the difference.agc_driver_sample_multisample_targetis skipped here (MoltenVK does not exposeshaderStorageImageMultisample), so the multisample-view regression seen earlier on NVIDIA does not manifest on this host — it is not re-tested, not fixed, on Apple.agc_shader_memorypasses.GPUs tested: Apple M2 Max (MoltenVK 1.4.2).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by gdols on 2026-10-22T07:33:34Z.
Rerun at
7081834388on the RTX 3080, as asked. GeForce RTX 3080, driver 616.92, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release,maind6eafa54d, this PR applied on top (clean).ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1. Every set ran 3 times without and 3 times withVK_LAYER_KHRONOS_validation(SDK 1.4.363.0);VK_LOADER_DEBUG=layershows it inserted in every test that opens a device, and no log haswas not found but was requested by env var VK_INSTANCE_LAYERS.It builds as is now: the two-argument
StorageViewcall inRunDepthCopyPasstakes the new default.mainmain+ the test onlyagc_driver_sample_multisample_targetagc_driver_image_store_float_roundingagc_driver_native_msaa_vertex_input,_image_repacked_float,_image_converted_unorm,texture_format_lookup,agc_driver_depth_storage,_dispatch,_reuse, and the other 17agc_*multisample*testsVUID-messages over the validation runsSo the multisample regression from
3764883214(10 of 10 failures, and 8VUID-vkCmdDispatch-format-07753in its validation run) is gone here too, and the otheragc_*multisample*tests pass, now that this head changes the creation flags of SINT and 16-bit float multisample targets.^agc_:main884 passed, 3 skipped, 3 failed (890 tests); this PR 884 passed, 3 skipped, 4 failed (891). The three on both areagc_driver_sample_order*, fixed by #9056. The fourth,agc_driver_pipelined_dispatch_item, fails before it submits anything, with "the two targets do not share their high address dword": its twoVirtualAllocblocks got different high address dwords. In isolation it fails 1 of 20 with this PR and 1 of 40 onmain, with the same message, so it isn't this change.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-22T11:05:04Z.
Linux, lavapipe as in CI's Linux job: Mesa 26.2.4 llvmpipe (LLVM 23.1.1, 256 bits) here,
GALLIUM_OVERRIDE_CPU_CAPS=avxas in CI, i9-11900K, CachyOS, GCC 16.2.1, CMake 4.4.3, Ninja, Release,ANYPS5_ENABLE_SPIRV_TOOLS=ON.main7e2ba73e4, this PR at 708183438 applied on top (merge a6c0904f4, clean).ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,-j1 --timeout 60; the validation runs underVK_LAYER_KHRONOS_validation1.4.363, inserted in 25 of the 26 tests perVK_LOADER_DEBUG=layer(texture_format_lookupcreates no instance). The 26 tests of @gdols's table above.Head. 25 of 26 pass in each of 3 plain and 6 validation runs.
agc_driver_image_store_float_roundingandagc_driver_sample_multisample_targetpass 9 of 9, as donative_msaa_vertex_input,image_repacked_float,image_converted_unormand the threedepth_storagetests.Red control, on a host where it fires.
mainsources (the 7 driver/recompiler files at7e2ba73e4) + onlyImageStoreFloatRounding.cppfrom this PR:agc_driver_image_store_float_roundingfails 8 of 8 (3 plain, 3 validation, 2 validation with-V), always at the same texel:That slot is
EdgeBits[15]=0x7f812345, a signalling NaN. lavapipe's f32→f16 store (lp_build_float_to_half, F16Cvcvtps2phin truncate mode on this CPU) quiets it to0x7e09;HalfTowardZerokeeps the payload,0x7c09.Checkwalks texels in order, so the 15 edge values before it pass onmainwithout the UINT view, among them the1 + 3·2⁻¹¹tie (0x3f803000→0x3c01),65520(0x477ff000→0x7bff) and the quiet NaN (0x7fc12345). So lavapipe is red, but not as a host that rounds to nearest, which is what the AMD and NVIDIA red controls above were waiting for: it truncates likeHalfTowardZeroand differs only on the NaN quiet bit, and since the test stops at that first mismatch, the eight edge values after it (the subnormals among them) are not exercised onmainhere. The Linux job runs on pushes tomainand is skipped on pull_request events, so it has not run on this head; after merge it would fail on a regression of this path, via the NaN slot alone.Validation. Head and red control alike: one message per run,
VUID-VkImageCreateInfo-samples-02258fromagc_driver_depth_storagecreating a 2-sampleD32_SFLOATimage that lavapipe does not support (sampleCounts1|4|8). It is the test's own probe (DepthStorage.cpp:358-362, "unsupported two-sample source refused cleanly"), present on themainarm too, and not from this PR's views. No otherVUID-lines in the 2,597-line-Vlogs.Not this PR.
agc_driver_multisample_retirementfails on both arms ("MSAA storage promotion did not retain its source image"), as it did on both arms of my #7747 matrix onmaina6dcea927on this host; it passes in CI's Linux job onmaincc0078595(run 39758811123), so it is a difference between this host's lavapipe and CI's, not a regression here; I have not isolated which.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-22T11:18:11Z.
RADV rerun at
7081834388, since the earlier RADV failure was clairtonmichel's RDNA3 run on the previous head.RX 9070 XT (RDNA4, gfx1201), Mesa 26.2.4 RADV, Linux 7.3.0 (CachyOS), GCC, Release. This PR merged onto
main4777caca3(clean).ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,ctest -j1 --timeout 60, 3 runs. The validation layer isn't installed on this machine, so these are plain runs only.agc_driver_image_store_float_rounding(16_FLOAT, 16_16_FLOAT, 16_16_16_16_FLOAT)agc_driver_sample_multisample_targetagc_driver_native_msaa_vertex_input,_image_repacked_float,_image_converted_unorm,_depth_storage,_depth_storage_dispatch,_depth_storage_reuseagc_driver_image_array_window_past_layer_limitmain4777caca3aloneSo the 16-bit float store regression on RADV is gone on this head.
image_array_window_past_layer_limitfails the same way with and without this PR (thread 7 component 0 is 107.000000/255, expected 147/255), so it's the existing failure flagged on #6772, not this PR's.Tested and written by Claude (AI assistant) on a contributor's machine.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by ryanc2112 on 2026-10-22T12:44:04Z.
RADV / Polaris run at
708183438(SteamOS 3.8.28, AMD Radeon RX 570 / Polaris10, Mesa 26.2.5, GCC 16.2.1, Release), merged ontomain4777caca3(clean, builds without changes) vsmain, withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(loader confirms the layer is inserted).agc_driver_image_store_float_roundingon unpatchedmainfails:image_store of 16_16_16_16_FLOAT: texel (3, 0) component 2 is 32767, expected 32265. With the PR it passes.agc_driver_sample_multisample_target+agc_driver_image_store_float_rounding: 3/3 pass with the PR.agc_driver,agc_driver_image_converted_unorm,agc_driver_image_repacked_float,agc_driver_image_store_*,texture_format_lookup): 11/11 with the PR, 10/10 onmain, zeroVUID-on both.agc_*+texture_format_lookup(868 with the PR, 867 onmain): identical failure set on both (image_plane_bias_on_single_level_volume(#9125),pixel_sample_iteration(#7825),sample_order_recipe_depth_locations,tessellation(Mesa, #5444),agc_idle_publish_wait), identical validation output (6×VUID-VkWriteDescriptorSet-descriptorType-00337on both). No regressions observed.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-23T19:51:51Z.
Review: CHANGES_REQUESTED
The change looks right and the hardware data in #8282 and the host runs above support it, but the branch now conflicts with
mainafter #6218 (packed storage images merged). Please rebase and resolve these three places, then rerun the focused tests:Graphics/src/Texture.cpp(StorageTexture::StorageView):mainnow picksPackedStorageViewFormat(storageFormat)first and falls back toUintFormatOfSint. Keep the packed route unchanged and applyuintStorageonly to the non-packed fallback, so the packed formats keep their view when the binding is outside the converted-float16 range.Optimization/src/ResourceMaterializer.cpp(inspectImageDescriptor):maincomputesSampledTextureNumericClass(remappedFormat).rawFloat16Storagehas to test the same remapped format thatmainnow uses, not the rawformat, otherwise a remapped descriptor takes a different path than the one the test covers.Graphics/src/MultisampleTarget.cpp(the storage-support check next to the newtwinFormatblock): keep both theuintStorageSupported()condition and thetwinFormatselection.After the rebase, please post
agc_driver_image_store_float_roundingandagc_driver_sample_multisample_targeton the rebased head, plus the existing packed-storage tests from #6218, to show the two view routes still work together.