Repository navigation
fix(agc): sample a multisampled 11_11_10 float texture in its sampled format - #11691
Conversation
… format Since boykopovar#8898 ResolveTextureFormat gives format 36 (11_11_10 float) its storage form R32_UINT, while a sampled format 36 image is read through its native B10G11R11_UFLOAT view (SampledTextureFormat). MultisampleTargetTexture and MultisampleTargetFirstSample still matched the resident target by ResolveTextureFormat, so a 10_11_11 float color target (B10G11R11_UFLOAT) sampled as a format 36 texture of the same shape was refused.
|
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.
|
|
I checked the six PRs the overlap comment could not compare against this branch. #8223, #10049, #10194 and #10233 merge with it without conflicts in |
jotitadev
left a comment
There was a problem hiding this comment.
Linux run on NVIDIA and lavapipe, since the description covers RADV only. Head f4274307ec on main b986c11a34 (patch applies cleanly). Ubuntu 26.04, GCC 15.2, Release. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, -j1. lavapipe selected with VK_ICD_FILENAMES=.../lvp_icd.json.
agc_driver_sample_multisample_target:
| RTX 3070 (NVIDIA 595.99.02) | lavapipe (Mesa 26.0.3) | |
|---|---|---|
main + the new case only |
fails: sampling multisampled color target ... (16x16, 4 samples, vk format 122) as a 16x16 texture of 4 samples and guest format 36 (vk 98) is not implemented |
same failure |
| this head | passes | passes |
Full ^agc suite (without agc_display_buffer_dcc, agc_driver_flip, agc_driver_lds_atomics64, --timeout 30) with #11692 and #11691 applied together on main: 1041/1042 on both devices. The one failure on each also fails on unmodified main on this machine, with the same message: agc_driver_pipeline_journal on the 3070 (the oversized record was not counted as a write failure; it passes when only the NVIDIA ICD is visible), and agc_driver_multisample_retirement on lavapipe (MSAA storage promotion did not retain its source image).
GPUs tested: NVIDIA GeForce RTX 3070 (proprietary 595.99.02, Linux), lavapipe (Mesa 26.0.3, LLVM 21).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head f4274307ecd56b995e43983780601bf6f70f2670; approve.
The format selection is consistent with the resource materializer: non-repacked descriptors use SampledTextureFormat, including format 36's native B10G11R11_UFLOAT view, while repacked formats retain ResolveTextureFormat. Both target matching paths (multisample sampling and first-sample reads) use the same selection. The regression covers 4x COLOR_10_11_11 rendered storage read through format 36 using both Dim2DMsaa and Dim2DMsaaArray, plus sample-0 image load/sample operations. I found no conflicting change to these comparisons in the manually checked overlap cases.
Validation evidence: the author reports the focused main/new-case/change comparison and 34 related MSAA tests on RADV with Khronos validation and zero VUIDs. An independent reviewer reports the focused failing-main/passing-change reproduction and an AGC suite run on both RTX 3070 and lavapipe; the sole suite failures also reproduce on unchanged main. Hosted product jobs are skipped by path policy. I could not run a fresh local GPU test here because this environment exposes no GPU device.
|
Windows + NVIDIA result for head This PR's own tests: Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84; Vulkan loader 1.4.357 from the NVIDIA driver), Khronos Validation Layers nightly 1.4.366 (b2b44c0d37) through Same focused run on
The tree also carried the open PRs #11951, #11711, #11704, #11692, #11690, #11794, #11949, all merged cleanly, so the run is a joint one; of those, #11692's new AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
|
Checked the format selection against |
What
Since #8898,
ResolveTextureFormatgives format 36 (11_11_10_FLOAT) its storage form,R32_UINT, which the shader packs and unpacks. A sampled format 36 image is still read through its nativeB10G11R11_UFLOATview (SampledTextureFormat, andnativeRepackedinResourceMaterializer).MultisampleTargetTextureandMultisampleTargetFirstSamplekept matching the resident multisampled target byResolveTextureFormat, so a 4xCOLOR_10_11_11float target, whichDecodeColorBufferrenders asB10G11R11_UFLOAT(the same bits as format 36), is refused when it is read through a format 36 texture descriptor of the same shape:Assassin's Creed Mirage (PPSA13960) stops on this line 86 to 91 s after start on
main.Both functions now match and fill a multisampled texture in
SampledTextureFormat. The repacked format 43 keepsResolveTextureFormat, as before: its sampled view needs repacked words, which the multisampled path does not produce. For every other format the two give the same Vulkan format, except the 8 and 8_8 sRGB formats on a device that cannot sample them, which were refused before and still are.agc_driver_sample_multisample_targetgains a case that draws a 4xCOLOR_10_11_11float target (0.25, 0.5, 0.125) and reads every sample through format 36Dim2DMsaaandDim2DMsaaArraydescriptors, and sample 0 throughDIM 2Dimage_load,image_sample_lzandimage_sample_l.Tested
Linux 7.2.11, GCC 16.2.1, Ninja, Release, AMD Radeon RX 9070 XT (RADV, Mesa 26.2.5). The tests ran on
mainabed035 and this branch on top of it;MultisampleTarget.cppand the test file are the same onmaina120df3, where the title runs below were made.ctest -V -R '^agc_driver_sample_multisample_target$'withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1:VUID-linesmainmain+ the new case onlyAGC graphics: sampling multisampled color target 0x55eec24a0000 (16x16, 4 samples, vk format 122) as a 16x16 texture of 4 samples and guest format 36 (vk 98) is not implementedNo run printed
was not found but was requested by env var VK_INSTANCE_LAYERS.The same settings over 34 multisample, FMASK and converted-format tests (
agc_driver_msaa_layout,agc_driver_msaa_dcc_clear_{2,4,8},agc_driver_msaa_dcc_compared_import_{2,4,8},agc_driver_multisample_*including the readback variants,agc_driver_native_fmask,agc_driver_native_msaa_vertex_input,agc_driver_native_multisample_depth,agc_driver_fmask_image_reads,agc_driver_cached_image_multisample_guard,agc_driver_image_msaa_address_on_plane,agc_driver_msaa_enable_single_sample,agc_driver_multisampled_pass_order,agc_driver_packed_unorm4444_multisample_partial_write,agc_driver_sample_mask_multisample,agc_driver_sample_multisample_target,agc_driver_image_converted_unorm,agc_driver_image_repacked_float,image_msaa_load): 34 of 34 pass onmainand on this branch, 0VUID-lines in both; the loader inserted the layer in the 32 tests that open a Vulkan device (agc_driver_msaa_layoutandimage_msaa_loaddon't).Assassin's Creed Mirage (PPSA13960),
maina120df3 andmain+ this change, otherwise the same build, Cross every 30 s:mainstops at 87 s on the line above. With this change that line is gone, and the title stops at 83 s on the next refusal: presenting reads the 0x1fe0000-byte surface at 0x10dfd20000, which overlaps the same 4x target:That is the overlap fix(agc): retire a multisampled color target the title wrote over #8223 and fix(agc): retire a multisampled color target a write-only storage image overwrites #10049 work on. With fix(agc): retire a multisampled color target the title wrote over #8223 (head 331399d) merged on top, that read passes too, and the title stops at 87 s on the partial clear described in fix(agc): retire a multisampled color target the title wrote over #8223's thread:
compute shader 0x1000810a00: AGC graphics: a cached image access of 0x10dc1d0000+0x480000 overlaps multisampled color target 0x10dc450000+0x480000 (4 samples), whose samples are only on the host: guest access to it is not implemented. Two other runs with this change (one of them with fix(agc): retire a multisampled color target the title wrote over #8223 merged too) segfaulted on the main thread 3 s after start, before any GPU work: the start-up crash fix(linux): enter the guest entry on a main stack at the console's address #7532 addresses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in their library's technical debt file.mdfiles or images added to the repository