Skip to content

fix(agc): leave a single-sample view over a published native multisample depth owner to guest memory - #16365

Merged
adriadam10 merged 6 commits into
boykopovar:mainfrom
hugodearaujo:fix/agc-single-sample-view-published-depth
Nov 10, 2026
Merged

adriadam10 merged 6 commits into
boykopovar:mainfrom
hugodearaujo:fix/agc-single-sample-view-published-depth

Conversation

@hugodearaujo

@hugodearaujo hugodearaujo commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What

A title can read the memory of a native multisample D32S8 target without HTILE through a single-sample view at the depth base. Assassin's Creed Mirage (PPSA13960) does: a compute reads mip 0 of an R11G11B10F chain it wrote over the planes, at the depth address (resource 0x10f5d40000 3440x1936 x1 fmt 36 against the owner 1720x968 x4).

DepthSurfaceTexture takes every view at the base of an owner into the native path, and a single-sample view fails its identity check there: native multisample depth sampled identity or format mismatch.

For an owner the host has not written since its import or its last publication (#15688), guest memory already holds every sample. The import only accepts planes that each hold one value, and a publication writes all samples back to the planes.

This change:

  • adds DepthSurface::GuestHoldsSamples: a multisampled owner without HTILE, imported for sampling, with no refusal, not written by the host since its import or publication;
  • returns no native texture for a single-sample view at the base of such an owner, so the view reads guest memory like any other texture;
  • keeps everything else: a multisampled view still reads the owner, and a single-sample view of an owner written since its publication still throws the identity mismatch.

Tested

Linux 7.2.11, AMD Radeon RX 9070 XT, RADV (Mesa 26.2.6), Release with tests.

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 (fix(agc): publish a written native multisample D32S8 owner without HTILE to its depth and stencil planes #15688 is merged)
  • Fixes: none
  • Unblocks: PPSA13960 together with the changes listed under Tested
  • GPUs tested: AMD Radeon RX 9070 XT, RADV Mesa 26.2.6, Linux 7.2.11
  • AI-assisted: yes

@JJenkx

JJenkx commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Correction (rerun): my first run rebuilt only the main test target, but the test pattern also matched agc_driver_native_depth_bda_clear (from agc_driver_native_depth_bda_clear_tests), which was left from an earlier build and so didn't include this PR. I reran with every matching executable rebuilt from a fresh merge onto main d60ebec0c2 (a9959d2c5d): same result, same counts, same single skip, no VUID- errors.

Windows check of head 345203a717, merged onto main 2d2d60a959 (ee21594005, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Radeon RX 6700 XT, AMD driver 26.10.1. Run through the Windows test queue with ANYPS5_REQUIRE_VULKAN=1 and Vulkan validation layers 1.4.363. The hosted Windows check does not run these GPU tests on pull requests.

  • 18 of the 19 agc_driver_native_depth_* tests pass in 3 of 3 runs on the real device, including this PR's publication_without_htile and single_sample_view. The Vulkan device was created in each run, and there were no VUID- errors.
  • agc_driver_native_depth_driver_queued_fill skips on every run: "host imports are compared here, not write-watched". That is the existing Windows condition, unrelated to this change.

AI-assisted: yes.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 345203a merged onto main 5299939 · tested 2026-11-06 12:46 UTC · 23 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,980 passed · 5 failed (0 new, 4 also fail on main, 1 unstable on main) · 53 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 3,038 of 4,210 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (981 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.5 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
Failing on main too (4, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
web_library_assets
Validation IDs already present on main (9 IDs in 588 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (588 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, and 580 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08739 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08741 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
Skipped (53)
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_net_ctl_disconnected: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_device_capability: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_four_k: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_height_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_limit: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_malformed: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_width_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_
Reproduce
git fetch origin 345203a7174384cde8b84240d292c982c3173a51 5299939ecfa9e186e1eb457c6f4bd133bdb087c7
git checkout 5299939ecfa9e186e1eb457c6f4bd133bdb087c7 && git merge --no-ff 345203a7174384cde8b84240d292c982c3173a51
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions

github-actions Bot commented Nov 7, 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 15941 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L1046-1047

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 1368 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 9895 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 9950 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 10469 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 10492 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 14344 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 15621 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 16116 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 16301 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 16880 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 7, 2026
…ished-depth

# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
@hugodearaujo

Copy link
Copy Markdown
Contributor Author

#15688 now merges main 1b7fd52 (79a72e5259). I merged that head into this branch (4b409e76e8, no force-push).

The only conflict was in NativeMultisampleDepth.cpp, where #15446 adds its stored repeat-fill test at the same place as this PR's test. The merge keeps both tests, and the test list merged on its own.

With the validation layer, I ran the description's command (now 57 tests):

  • 55 pass, agc_driver_native_depth_single_sample_view and agc_driver_native_depth_stored_repeat_fill among them;
  • 2 skip because this device can't run them (agc_storage_pending_key_refresh and agc_storage_clear_hand_over);
  • no log has a VUID- line.

check_conventions passes.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 7, 2026

@gabichuuuuu gabichuuuuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows check of head 4b409e76e8, merged onto main 4e44ed59b2 (clean merge), with main from the same build directory as the control.

Setup: Windows 11 x64, WinLibs GCC 15.2.0 r7, Release, full build. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -R '^agc_driver_native_depth_', 3 runs per GPU on each side.

NVIDIA laptop GPU, driver 610 Intel iGPU, same machine
main 3 of 3 runs pass 3 of 3 runs fail stencil_view, uniform_planes and publication
this PR 2 of 3 runs pass all 20; run 3 timed out in native_depth_stencil the same three, plus publication_without_htile, 3 of 3
  • The new agc_driver_native_depth_single_sample_view passes in every run on both GPUs.
  • The timeout is this machine stalling, not the change: in that run a skipped test took 25.5 s and aliased_depth_depth_only 24 s, against under 1 s normally, and native_depth_stencil passes in the other runs on both GPUs.
  • publication_without_htile comes with the #15688 commits this branch merges. On the Intel iGPU it fails with a written D32S8 owner without HTILE did not publish its stencil samples and padding, the same D32S8 stencil pattern as the three tests that already fail on main there, and it passes on the NVIDIA GPU. I'm looking into that separately; it doesn't block this PR.
  • Not run with VK_LAYER_KHRONOS_validation.

AI-assisted: yes.

@muhmuhkuh

Copy link
Copy Markdown
Contributor

We have a fix for the same descriptor on a downstream stack, with a test that may be useful here. A single-sample descriptor at the base of a native multisample depth owner reads the guest bytes through the ordinary texture path, the same cut as GuestHoldsSamples makes here.

Where ours goes further is an owner the host has written since its last publication. It publishes first and then returns to the texture path: PublishForGuestRead publishes only when hostWritten, and refuses while a multisampled colour target is being acquired. That is the case of a D32 owner with HTILE after a draw. By reading, GuestHoldsSamples() needs uniformPlaneTarget(target) and !hostWritten, so such an owner still takes the MSAA branch and throws native multisample depth sampled identity or format mismatch. We have not run it on this head: the case needs a published D32 owner, which main does not publish yet (#9950 and #16501 do).

Our test, agc_driver_native_depth_single_sample_reads, draws D32 through the driver at 2, 4 and 8 samples where the device samples them, at 5x3 and at 70x67 with pipe-bank XOR 0x8c00, two draws. After each draw it reads the depth through one-sample descriptors of format 22 and format 1, at the size the samples unfold to and at the surface's own size. Every texel must equal the same read of a copy of the published guest bytes, texel 0 must hold the drawn depth, and after the second draw no texel may keep the first draw's depth. The owner must still serve its own descriptor with every drawn sample. A wrong XOR and a 2D MSAA descriptor of another format must still throw; the message now names the descriptor's and the target's format, extent, samples, swizzle mode, XOR and metadata. On main fb075eb332 with #9950 merged (Windows 11 Pro 10.0.26200, NVIDIA GeForce RTX 3080 Ti, driver 610.88, validation layer 1.4.366 loaded, ANYPS5_REQUIRE_VULKAN=1, no was not found but was requested, no VUID-), the 56 tests of the native depth, multisample readback, depth plane sampling and depth storage targets pass with it (55 passed, 1 skipped, the same skip as without it). Without the driver change, and with the test and the changed refusal checks kept, the first one-sample read throws native multisample depth sampled identity or format mismatch, and agc_driver_native_depth_clears and agc_driver_native_multisample_depth fail on the changed refusal message.

The two fit with one shared condition. Your uniform-plane case needs no publication; ours publishes when hostWritten. After both land, the line in DepthSurfaceTexture could read if (base.samples != 1u && resource.dimension != k2DMsaa && found->GuestReadable() && !depthCopySourceActive) { found->PublishForGuestRead(); return nullptr; }, where GuestReadable() is a multisampled owner with samplingActive and no refusal, and GuestHoldsSamples goes away.

It is up as #16880, stacked on #9950 for now, since the test needs its D32 publication. If this PR lands first, I rebase #16880 on it and take the shared condition above. If you prefer, I can instead hand over the host-written case and its test as a commit on top of this PR.

AI-assisted: yes

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

#15688 now merges main 077b4ed (6def8cd51a). I merged that head into this branch (74657810c3, no force-push).

The only conflict was in NativeMultisampleDepth.cpp, where #15443 adds its aliased-depth tests at the same place as this PR's test. The merge keeps both, and the test list merged on its own.

With the validation layer, I ran the same command as before (ctest -R "native_depth|native_multisample|depth_storage|depth_surface|agc_storage_|multisample_guest|repeat_storage_guard|cached_image|storage_flush_ordering|storage_one_slice|storage_read_during|storage_write_back|msaa_address_on_plane"), now 62 tests:

  • 60 pass, agc_driver_native_depth_single_sample_view, agc_driver_native_depth_uniform_plane_alias and agc_driver_native_depth_htile_plane_alias among them;
  • 2 skip because this device can't run them (agc_storage_pending_key_refresh and agc_storage_clear_hand_over);
  • no log has a VUID- line.

check_conventions passes.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 8, 2026
@hugodearaujo

Copy link
Copy Markdown
Contributor Author

#15688 is merged now, so I merged main bbaa4bf into this branch (1ef0ec3593, no force-push) and set the description's "Depends on" to none. The only conflict was in NativeMultisampleDepth.cpp, where #15690 adds its --smaller-extent test at the same place as this PR's test. The merge keeps both, and main's side of the file is unchanged.

With the validation layer, I ran the same command as before, now 62 tests:

  • 60 pass, agc_driver_native_depth_single_sample_view among them;
  • 2 skip because this device can't run them (agc_storage_pending_key_refresh and agc_storage_clear_hand_over);
  • no log has a VUID- line.

I left agc_storage_write_back_scratch out of this run: the amdgpu kernel driver on this machine faulted during a run of it yesterday, and I haven't rerun it yet. check_conventions passes.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 9, 2026
@hugodearaujo

hugodearaujo commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

#15707 is merged now, and its --covered-owner test sits at the same place in NativeMultisampleDepth.cpp as this PR's test, so I merged main c26cc2e into this branch (ed02f94cae, no force-push). That was the only conflict; the merge keeps both tests, and main's side of the file is unchanged.

With the validation layer, the same command as before, now 63 tests:

  • 61 pass, agc_driver_native_depth_single_sample_view and agc_driver_native_depth_covered_owner among them;
  • 2 skip because this device can't run them (agc_storage_pending_key_refresh and agc_storage_clear_hand_over);
  • no log has a VUID- line.

agc_storage_write_back_scratch, left out of that run (see my previous comment), passes 3 of 3 runs on this head on its own since, with no VUID- line and no amdgpu error in the kernel log. check_conventions passes.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 9, 2026
@hugodearaujo

Copy link
Copy Markdown
Contributor Author

@muhmuhkuh Thanks. I'd go with your first option: keep #16880 as its own PR and rebase it onto whichever lands first. Its test needs the D32 publication from #9950 (or #16501), which this PR doesn't have, so taking the host-written case here would make this PR depend on #9950.

The shared condition looks right to me as the end state, with one correction: this PR's test does change under it. --single-sample-view checks that a one-sample read right after each of its two draws still refuses (native multisample depth sampled identity or format mismatch), and that a guest read then publishes the draw. Under the shared condition that read publishes instead, which is the point of #16880, so those two checks become checks that the read publishes the draw.

I tried it on this PR's earlier head 4b409e76e8 (before #15688 and #15690 were merged), with GuestReadable() and PublishForGuestRead() as in #16880 and the shared condition in place of this PR's line. These are the 21 ^agc_driver_native_(depth|multisample) tests with the validation layer, on an RX 9070 XT with RADV Mesa 26.2.6:

Neither run logged a VUID- line. Whichever of the two PRs lands second updates the two checks in CheckSingleSampleView.

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

#16363 is merged. It added ProveOverwrite() in DepthSurface.cpp where this PR adds GuestHoldsSamples(), and its --overwritten-planes test where this PR adds its test, so I merged main 1e67c27 into this branch (c8c3050709, no force-push). Both sides only add at those places, and the merge keeps both in full: ProveOverwrite() first, then GuestHoldsSamples(). This PR's added and removed lines are unchanged.

With the validation layer, the same command as before, 64 tests:

agc_storage_write_back_scratch is still left out, as before. check_conventions passes. main has since moved to 2c41a03, which touches none of these files.

@github-actions github-actions Bot added unblocks title Names a title ID on the Unblocks line review queue Next in the maintainer review queue: checks pass, no open change request, no conflict and removed needs rebase Conflicts with main, rebase needed labels Nov 10, 2026
@adriadam10
adriadam10 merged commit 94d7092 into boykopovar:main Nov 10, 2026
15 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Re-checked after #16363 merged: ProveOverwrite() only acts once the owner was host-written and leaves hostWritten set until publication, so GuestHoldsSamples() still holds exactly for unwritten or published owners; both tests (--overwritten-planes, --single-sample-view) are kept in full; merged.

@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 10, 2026
oneandonlydean pushed a commit that referenced this pull request Nov 19, 2026
DepthSurface.cpp conflicted with #16365: its GuestHoldsSamples() member goes before PublishToGuest's declaration, which keeps this PR's bool PublishToGuest(DepthReadCause cause). The debt file conflicted with #16364 in the Native D32S8 guest publication entry: it keeps this PR's text, with #16364's change as "pending storage writes over a plane", and "a kept plane holding the host's bytes" shortened to "a kept plane of host bytes" to stay within 1000 characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants