Skip to content

fix(agc): enable independentBlend for color targets with different blend states - #6782

Open
XairRrR wants to merge 1 commit into
boykopovar:mainfrom
XairRrR:fix/independent-blend
Open

XairRrR wants to merge 1 commit into
boykopovar:mainfrom
XairRrR:fix/independent-blend

Conversation

@XairRrR

@XairRrR XairRrR commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What

Graphics pipelines give each color target its own blend state, decoded from its CB_BLEND<n>_CONTROL, but the device was created without the independentBlend feature. A pipeline whose targets blend differently was therefore invalid (VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605: "pAttachments[2] is different than pAttachments[0] and independentBlend feature was not enabled"); a driver is free to apply attachment 0's state to every target.

The feature is now required and enabled at device creation, like sampler anisotropy and BC texture compression. It is core Vulkan 1.0 and supported by desktop GPUs and lavapipe.

Tested

  • Built and tested on main at 3f171d0; rebased onto aff725b, where main itself does not build here (PipelineJournal.cpp static assertions on ShaderStages and MeshConfiguration), which this change does not touch.
  • Linux (Arch, kernel 7.2.9), RTX 4070 Ti SUPER, driver 615.78.08.
  • Uncharted: Legacy of Thieves Collection (PPSA05684, Uncharted: Legacy of Thieves Collection (PPSA05684) on Linux / NVIDIA #4001) under VK_LAYER_KHRONOS_validation: the validation layer reported 00605 for its multi-target pipelines (20 reports, the duplicate limit, in the first minutes).
  • agc_driver_graphics, agc_driver_dual_source_blend, agc_driver_reversed_order_blend, agc_driver_swap_alt_blend and the color target tests pass, with no 00605 report under the validation layer.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 4070 Ti SUPER, driver 615.78.08, Linux
  • AI-assisted: yes

…end states

Graphics pipelines give each color target its own blend state (from its
CB_BLEND<n>_CONTROL), but the device was created without the independentBlend
feature, so a pipeline whose targets blend differently was invalid
(VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605). The feature is
now required and enabled, like sampler anisotropy and BC compression.

AI-assisted: yes

@MarcZX10 MarcZX10 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.

Reviewed the device feature enablement and validation. The reported multi-attachment pipeline needs independentBlend, and the code checks support before enabling it; existing device requirements already use this fail-fast feature model. The validation-layer reproduction and focused blend tests support the change; I found no blocking issue.

@github-actions github-actions Bot added the agc libSceAgc* label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

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 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7275 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9898 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12120 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12567 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12944 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13646 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14344 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

@fma-rc fma-rc 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.

Astro's Playroom (PPSA01325) hits the same thing. Linux, RTX 5080 (NVIDIA 615.78.08), VK_LAYER_KHRONOS_validation with the duplicate limit off, from boot into the first level: main 82ddae7 reports VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 8 times, main with this PR 0 times. No independentBlend throw, both runs reach the level, and the frames I could match between the two runs are the same. The other validation messages are the same kinds in both runs.

@Amoenus

Amoenus commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Independent validation of exact head 4433a62b3, merged unchanged into integration63d on main adb0e7a8cb. This composition also has an adapted #6235, whose mixed-MRT fixture exposes the feature requirement.

Before your two-line change, Khronos core validation1.4.363 logs ten VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 errors in PreparedExports on each actual GPU, despite a successful readback/test exit. With your change, PreparedExports and FrontFaceAllBits each pass3/3 on RTX5080 (10de:2c02, driver32.0.16.1062) and Radeon Graphics (1002:13c0, driver32.0.21036.18): 12 fresh physical-GPU processes, zero layer errors/warnings, layer insertion and device identity verified in every log. Ubuntu24.04 WSL / GCC13.3 / Mesa25.2.8 llvmpipe adds six ordinary fixture passes. Windows11 Enterprise26200 / WinLibs GCC15.2r7; Vulkan required, project shader cache disabled; no selected skips/timeouts.

Full Windows/Linux relinker/libs builds pass for this composition; this is not a standalone-head/main build claim. Fresh Sonic PPSA99902 runs on both physical GPUs retain their separate DCC/Vulkan submission stops, with no new menu/gameplay claim. No duplicate fix. AI-assisted: yes (Codex); author responsible.

@Sam-mon7

Copy link
Copy Markdown
Contributor

One more title and OS for this change: Demon's Souls (PPSA01341), Windows 11, RTX 4070 (driver 610.88), VK_LAYER_KHRONOS_validation with core and object-lifetime checks (duplicate limit 3), same route into the Nexus each run.

  • Without independentBlend: VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 reported until the duplicate limit.
  • With the feature enabled at device creation (an equivalent local change): no 00605 report on the same route, through the Nexus arrival and 74 s after it. The only error left was the unrelated image-view usage one (02275, covered by fix(agc): restrict sampled storage texture view usage #862).

The stack was main 3ebad9045 (2026-10-13) plus other open PRs, not current main.

AI-assisted: yes

@DavidAmsellem

Copy link
Copy Markdown
Contributor

First AMD-on-Linux (RADV) data for this PR. Merged onto main c4708fa20 (clean merge) and compared with the same main, on the same machine.

Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8. Khronos validation layer 1.3.275, confirmed loaded with VK_LOADER_DEBUG=layer.

Validation run, ANYPS5_NO_SHADER_CACHE=1 main with this PR
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 16 (13 in agc_driver_prepared_exports, 3 in agc_driver_srgb8_color_target) 0
agc_driver_prepared_exports, agc_driver_srgb8_color_target Passed Passed

The only other VUID- lines in these runs come from the old layer: VkDeviceCreateInfo-pNext-pNext, because it predates VK_KHR_maintenance8, and VkGraphicsPipelineCreateInfo-pLibraries-06681. Their counts are identical with and without the PR (4 and 26). The PR adds no new VUID-.

Full suite without the layer (ANYPS5_REQUIRE_VULKAN=1 ctest -j8): 1631/1633 on both main and with this PR. The two failures are the same on both: agc_driver_image_table_vouched_lookups (#7766, fix in #7916) and agc_driver_guest_memory_lifetime (#7784).

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

@embersas

Copy link
Copy Markdown

Independent Windows GPU validation of standalone head 4433a62b3bf6248df830994a255701c72581cc95, checked again before posting and still unchanged. This was built directly from the PR head, without merging newer main or adding production changes.

Ryzen 9 3900X, RTX 3080 Ti, supported WinLibs MinGW-w64 GCC 15.2.0, Release, SPIRV-Tools disabled.

All five focused runs passed:

  • Our added synthetic agc_driver_independent_blend fixture: GPU pixel readback verifies equal and different MRT blend states, FP32/FP16 exports, both attachments, masked channels and unchanged pixels outside the scissor.
  • The same fixture with APS5_NO_GPL=1: passed. Device logs confirm pipelineLibrary=0, versus 1 in the normal run.
  • Existing agc_driver_dual_source_blend and agc_driver_swap_alt_blend: passed on the GPU.
  • agc_driver_graphics: mock suite passed.

The four GPU processes used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Khronos validation 1.4.363 was positively loaded in each process. Full stdout/stderr contained no VUID errors or missing-layer warnings; no GPU tests were skipped.

These results verify the tested independent-blend behaviour on this NVIDIA device. They are focused head validation, not a parent comparison, full-suite result or game-performance claim. No game was run.

AI-assisted testing and report: Codex.

@xXPBSXx

xXPBSXx commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Validation-layer data point for this PR (data only).

Setup: Linux (WSL2 Ubuntu 24.04, GCC 13.3, Release), llvmpipe, vulkan-validationlayers 1.3.275.0-1 from the Ubuntu archive (older than the SDK a driver ships with), VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. main 950388bfd; this PR's change (the two lines in VulkanDevice.cpp, taken as git diff upstream/main...refs/pr/6782) applied on top of it.

Before (main): across all 483 built agc_driver_*_tests, VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 ("pAttachments[1] is different than pAttachments[0] and independentBlend feature was not enabled") is reported 16 times, all from agc_driver_prepared_exports and agc_driver_srgb8_color_target.

After (this PR): those two tests, run again with the layer: 0 reports of 00605; both pass. The layer was active in the run (the VUID-VkDeviceCreateInfo-pNext-pNext lines about an unknown VkStructureType, which an older layer raises for every device, are still there).

One run each. I did not run this PR's change on the RTX 4080 SUPER or the RX 6400 for this comment.

Not run: the other 481 tests with the change under the layer, other GPUs, other platforms.

AI-assisted (Claude Code).

@embersas

Copy link
Copy Markdown

Additional integration validation on base cc0078595d4f24e9df0698ca5a4a062c61592f6f, with the production corrections from #6782 (4433a62b3bf6248df830994a255701c72581cc95), #862 (bbcaad4b2f0fd8b91dd4430e520c86c1bacb147f) and #8667 (47e1539ac5afe87b602fe450d744999cd97cae9e) applied together. This was a local integration of the corrections, not a merge of the three PR branches.

Windows, Ryzen 9 3900X / RTX 3080 Ti, WinLibs GCC 15.2, Release. All 25 focused CTest selections qualified. The 23 GPU executions positively loaded Khronos validation 1.4.363 and identified the RTX 3080 Ti; full stdout/stderr contained no VUID errors, synchronization hazards, missing-layer warnings or skipped tests. The other two selections were non-GPU controls.

The independent-blend fixture passed with pipeline libraries enabled and with APS5_NO_GPL=1; the existing dual-source and alternate-blend checks also passed. This supplements the standalone-head results above with a newer-source integration check.

Focused correctness testing on this configuration; not a full repository suite or a performance result.

AI-assisted testing and report: Codex.

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Data point from the AMD proprietary driver on Windows, which I don't see covered above yet (earlier runs were NVIDIA on Windows and RADV on Linux).

Setup: AMD Radeon RX 6700 XT, driver 32.0.21045.16010, Windows 11 22H2 (10.0.22621), MinGW-w64 GCC 15.2 UCRT r7, Release. Khronos validation layer 1.4.309 (built locally), ANYPS5_REQUIRE_VULKAN=1, shader cache off. agc_driver_prepared_exports run 3 times per arm.

arm result validation lines per run
main 21554447d0 passes 3/3 20× VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 ("pAttachments[1] is different than pAttachments[0] and independentBlend feature was not enabled")
this PR 4433a62b3b, on its own base aff725bf6d passes 3/3 20× VUID-VkGraphicsPipelineCreateInfo-pLibraries-06681

The 00605 errors are gone with this PR. The same pipelines then report a different error instead:

vkCreateGraphicsPipelines(): pCreateInfos[0] is linking libraries with pre-raster and fragment shader state. The descriptor set layout at index 1 in pSetLayouts from VkPipelineLayout 0x320000000032 in the fragment shader state is NULL. However, the descriptor set layout at the same index (1) in VkPipelineLayout 0x310000000031 in the pre-raster state is NULL too.

I have not established whether this PR introduces it.

  • A full ^agc_ run on main under the same layer (932 tests) logs no 06681 at all, which suggests the layer stops at 00605 on these pipelines on main, so the library check never ran.
  • The message itself (both set layouts null at index 1) may be a quirk of this 1.4.309 layer.

The two arms also differ in base (main 21554447d0 against this PR's week-old aff725bf6d). A run of this PR merged onto current main would separate those. In the same main run, 00605 also comes from agc_driver_srgb8_color_target (6 lines), a test not on this PR's base.

AI-assisted: yes (Claude Code).

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Follow-up to my AMD comment above, with matched bases. The 06681 lines came from this PR's older base, not from the PR.

This PR merged locally onto the same main 21554447d0 as the control (clean, 2cf314476d, not pushed). Same RX 6700 XT, driver 32.0.21045.16010, validation layer 1.4.309, agc_driver_prepared_exports and agc_driver_srgb8_color_target, 3 runs per arm:

arm result validation lines per run
main 21554447d0 2/2 pass 26× VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (20 from prepared_exports, 6 from srgb8_color_target)
main 21554447d0 + this PR 2/2 pass 0

So on current main this PR removes every 00605 these tests produce on AMD Windows and introduces nothing else. The pLibraries-06681 lines in my earlier run appeared only on the PR's own base aff725bf6d, and current main does not produce them.

AI-assisted: yes (Claude Code).

@blawesom

Copy link
Copy Markdown
Contributor

Static review plus an independent Linux/AMD run on both trees per the repo AGENTS AGC protocol (CachyOS, kernel 7.2.10, GCC 16.2.1, Ninja 1.13.2, Release, BUILD_TESTING=ON, Ryzen 7 9800X3D). No findings.

What I checked

  • Minimal, correct fix: Vulkan pipelines with per-target blend state need independentBlend enabled; without it, VkPipelineColorBlendAttachmentState differences are ignored (drivers fold them to attachment 0's state), silently misrendering draws whose blend states differ per MRT. Adding require(available.independentBlend) + enabled.independentBlend = VK_TRUE to the VulkanDevice ctor is exactly the right size and place.

Paired test runs (AGENTS AGC protocol, VVL env)

Focused set: the four blend fixtures touching per-target blend paths (dual_source_blend, reversed_order_blend, swap_alt_blend, unclamped_normalized_blend):

fixture this head 4433a62b3b main bb04a4f1ea
agc_driver_dual_source_blend Passed (0.45s) Passed (0.04s)
agc_driver_reversed_order_blend Passed (0.21s) Passed (0.21s)
agc_driver_swap_alt_blend Passed (0.05s) Passed (0.04s)
agc_driver_unclamped_normalized_blend Passed (0.13s) Passed (0.13s)

Both logs: 0 was not found but was requested by env var VK_INSTANCE_LAYERS, 0 VUID-. Comparing logs, no new errors from this change.

@TechLevelZero

TechLevelZero commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 4433a62 merged onto main e6f5730 · tested 2026-11-01 15:22 UTC · 19 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,429 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 45 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 2,480 of 3,148 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 (931 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.3 s, ⚠️ agc_driver_graphics_maps_fallback 34.6 s, ⚠️ agc_driver_graphics 34.3 s
Unstable on main (3, 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
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 484 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (484 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 476 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-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
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_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
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_video_out_color_space: 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_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_flip_dcc: 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_deferred: 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_eop: 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_eop_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_eop_main: 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_fps_limit: 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_o
Reproduce
git fetch origin 4433a62b3bf6248df830994a255701c72581cc95 e6f57307fa7f47165d7fc1bee945abdb2f6816e7
git checkout e6f57307fa7f47165d7fc1bee945abdb2f6816e7 && git merge --no-ff 4433a62b3bf6248df830994a255701c72581cc95
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.

@embersas

Copy link
Copy Markdown

Local Windows validation on Ryzen 9 3900X / RTX 3080 Ti (driver 610.88), WinLibs GCC 15.2, Release. Base bb04a4f1ea plus #10935 at 6076b8591c; this PR applied at 4433a62b3b.

  • Before this change, a local title reported VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605: different attachment blend states with independentBlend disabled. With this change, that error did not recur.
  • The same 10 focused CTests passed before and after: reversed-order, dual-source and swap-alt blend; draw-cache reuse/relocation; finisher label order; image-table cache bounds; and the three draw-pipeline variants. No skips, missing validation layer, VUIDs or synchronization hazards in either test log. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.
  • The combined build reached the offline mode-selection menu with the draw pipeline off and on. No Vulkan validation errors detected in those game logs.

Limits: progressing runs used on-demand preparation (APS5_LAZY_SHADER_PREPARE=1, APS5_NO_LIBRARY_PREBUILD=1), 18 GiB resident / 22 GiB private caps and a 500-second bound. Default preparation hit the resident cap. No actual fight or sustained stability verified. Diagnostic captures/logging and cache warming prevent a speed claim. Conventions passed.

AI-assisted: yes (Codex); builds and runs performed locally.

@JJenkx

JJenkx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Additional Linux/RX6650XT title evidence for head 4433a62b3bf6248df830994a255701c72581cc95: Ikai PPSA06584 on pinned main 52f212ec053 emits16 VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 messages. A clean private composition of this head plus #6913 emits zero; #6913 also removes the separate vertex/index buffer-usage messages. Both native runs close normally with the validation layer actually loaded. The same six focused test groups pass on both frozen builds, with zero skips/VUIDs and a failing buffer-usage negative control.

Complete composition pins, test scope, numeric comparison and downloadable evidence. The native evidence is for the combined changes; the painting scene's black rectangular/streaked regions remain, and no graphics/FPS improvement is claimed. Neither public branch was rewritten.

@fogydes

fogydes commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

should-fix

Findings

  1. [verified] Freshness & Mergeability: git merge-tree --write-tree origin/main pull/6782 succeeds cleanly with exit code 0 and tree SHA 32b33c222397bb2a20b88f6e90253660a3d23082, despite being 13,607 commits behind origin/main.
  2. [read-only] Vulkan Validation Verification: Provides concrete Vulkan validation layer evidence on RTX 4070 Ti SUPER demonstrating elimination of VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 on multi-target pipelines (observed on Uncharted PPSA05684), with focused blend suites passing cleanly without validation errors.
  3. [read-only] PR Template Checklist: The checklist in the PR body omits the required - [ ] Fixes: none (or issue reference) item from .github/pull_request_template.md.
  4. [verified] Conventions: tools/check_conventions.py --base aff725bf6d8d61ed33e80507421fd131aeae1305 passes cleanly with zero violations in an isolated worktree.
  5. [verified] Cross-PR Ledger: Pairwise merge simulation against concurrent open PR perf(agc): move per-draw thread-locals to TEB slots #6615 (07bb9f628d), which also modifies VulkanDevice.cpp, merges cleanly (git merge-tree exit code 0, tree 5e3fc3a5643fb3affb1b6079277ae614f5ae8f6d).

Freshness Envelope

  • Head SHA: 4433a62b3bf6248df830994a255701c72581cc95
  • Merge-base SHA: aff725bf6d8d61ed33e80507421fd131aeae1305
  • Behind count: 13,607 commits
  • Merge-tree: clean (exit code 0, tree 32b33c222397bb2a20b88f6e90253660a3d23082)

@MarcZX10 MarcZX10 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.

Reviewed — changes requested

The PR body omits the required Fixes: checklist item from the current repository template.

What I ran

Reviewed the unchanged head 4433a62b3bf6248df830994a255701c72581cc95; PR base is aff725bf6d8d61ed33e80507421fd131aeae1305, and the current-main preview against 98ddd9c1792bbab016ceed5db267a93d1d61f00a is clean. Environment: Debian 12, Linux x86_64, Python 3.11.2, Git 2.39.5. This follow-up checks PR metadata; I did not rebuild or rerun the unchanged AGC code.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 6782
gh pr view 6782 -R boykopovar/AnyPS5 --json body,headRefOid,baseRefName,state
git show refs/review/main-live:.github/pull_request_template.md

Results

Check Result
Whitespace and conventions Passed in the precheck
Current-main merge preview Clean per the precheck's live stack report
PR body against current template Failed: the body omits Fixes:
Build and AGC tests Not run in this metadata-only follow-up
Relevant raw output
All conventions checks passed.
Target branch tip: `98ddd9c1792bbab016ceed5db267a93d1d61f00a`
- PR #6782: **clean** against current base; head `4433a62b3bf6248df830994a255701c72581cc95`

Findings

Blocking

  • The current template requires a Fixes: line in every PR body. The body has Depends on: and Unblocks:, but no Fixes: entry. Please add Fixes: none if no issue is closed, or the correct Fixes #N reference if one is. This is a template/contribution-rule correction; the code approval previously submitted remains scoped to the unchanged head.

Sources

To get this to a good state

Please update the PR body with the correct Fixes: value. I will rerun the body and convention checks after the update.

@JJenkx

JJenkx commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Additional Linux/RADV validation of exact #6782 head 4433a62b3bf6248df830994a255701c72581cc95 against pinned main 6a3afa4deb18ea58a90efb8040fff8c60e4f2aab, including the real-title saved-frame path that reproduced #11990.

Host: Arch Linux, AMD Radeon RX 6650 XT / RADV NAVI23, Mesa and vulkan-radeon 1:26.2.4-1, Release, SPIRV-Tools enabled. Focused CTests and strict same saved Ikai (PPSA06584) driver-frame replay used ANYPS5_REQUIRE_VULKAN=1, shader/pipeline caches disabled, Khronos VVL, and the same GPU. GPU cases and each replay show the actual layer/device in their logs; no missing-layer warning.

Pinned source Focused tests Test VUIDs Replay 00605 messages Raw 00605 ID occurrences
main 6a3afa4deb18 15/15 0 3 6
main + #6959 327addf79eae 17/17 0 10 20
main + #6782 4433a62b3bf6 15/15 0 0 0
main + both 17/17 0 0 0

All tests executed, no skips. Every strict replay completed one frame / 19 submissions, with zero failed recorded registrations, unfinished submissions, pace timeouts or synthesized waits; each reports 78 stale prologue registrations from before the captured frame. For clarity, the earlier 6/20 counts are raw ID occurrences (header plus spec link), corresponding to 3/10 error messages.

The four source banks have independent, pinned modules. For #6782 I rebuilt the complete changed VulkanDevice.cpp and relinked each whole driver using SHA-verified unchanged production objects from the corresponding already-built main / #6959 bank. This is module/focused-suite qualification, not a clean whole-repository build or Windows run. Original public branches are unchanged; #6959 and #6782 were integrated privately from the exact heads above.

Numeric results, exact recipes/source hashes and complete synthetic CTest logs, SHA-256 81c754526c284f04b1686399a8e6532cb35abfccbdfa34c15a00c9227c22f6b8 (download verified). Game assets, frame captures, images and raw game replay logs are not included. Replay timings are not game FPS and no performance gain is claimed.

Enabling this PR leaves every pixel of the presented replay image identical, both with and without #6959, while eliminating the validation errors. This supplies an additional title-derived reproduction beyond the synthetic cases.

AI-assisted: yes (Codex); runs and numbers above are from this Linux machine.

@JJenkx

JJenkx commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Windows / AMD proprietary driver check of head 4433a62b3b. The Linux evidence above is RADV; this one is AMD's own driver. Windows 11 Enterprise 10.0.22621, Radeon RX 6700 XT, AMD proprietary driver 26.10.1, WinLibs GCC 15.2.0 UCRT r7, Release, VK_LAYER_KHRONOS_validation built from vulkan-sdk-1.4.363.0.

  • main 18f5949788: in a full GPU-suite run, agc_driver_prepared_exports and agc_driver_srgb8_color_target both pass, but the layer reports VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 in each. These are the only two tests in the 3,164-entry suite that report it.
  • This PR merged onto 18f5949788 (7b5b5309a1, clean, local only): both pass 3 of 3 (--repeat until-fail:3). The layer was inserted 6 times and reports no VUIDs.

AI-assisted: yes (Claude Code).

@TripyFox

TripyFox commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Windows / NVIDIA data point for this change, since the PR lists Linux only.

  • Host: Windows 11 Pro 10.0.26200, NVIDIA GeForce RTX 5090 (driver 621.01), Ryzen 7 9800X3D, 64 GB. WinLibs GCC 15.2.0 r7, Release, libs target.
  • Title: ASTRO BOT PPSA21567 01.019.000, -lvl hub_crashsite, 120 s per run, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation APS5_NO_PAD_INPUT=1. Neither log contains "was not found but was requested by env var VK_INSTANCE_LAYERS"; both reach Level has started: hub_crashsite.
  • main 4f41f4c: VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 x10 ("pAttachments[1] is different than pAttachments[0] and independentBlend feature was not enabled"), warnings WARNING-VkImageSubresourceRange-layerCount-compatibility x10 and Undefined-Value-ShaderOutputNotConsumed-DynamicRendering x10.
  • main + independentBlend enabled (a local equivalent of this PR's device-creation change): 00605 x0, the two warnings unchanged at x10 each, no new VUID- lines.
  • vkGetPhysicalDeviceFeatures reports independentBlend available on this device, as expected for a desktop GPU.

Logs attached on request. AI-assisted: yes (Claude Code); the runs were made on my machine.

@XairRrR

XairRrR commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, everyone, for the validation data. Here is each point raised since the last commit.

MarcZX10 (changes requested) and fogydes (finding 3): you're right, the body was missing the Fixes: item that the current .github/pull_request_template.md requires. I've added Fixes: none to the checklist. I'm not aware of an open issue this change closes. The 00605 report came from title runs under the validation layer, not from a filed issue.

fogydes (findings 1, 2, 4 and 5): these are verification results, and none of them asks for a change. The worktree confirms the merge with current main 04a9eb4 is still clean. Against that main, the diff is still just the two lines in VulkanDevice.cpp: require(available.independentBlend, ...) and enabled.independentBlend = VK_TRUE, next to the existing sampler anisotropy and BC requirements.

The other reports cover these platforms:

  • NVIDIA on Windows and Linux.
  • AMD proprietary on Windows.
  • RADV and Intel Arc.
  • llvmpipe.
  • Several titles: Astro's Playroom, Demon's Souls, Ikai, ASTRO BOT and others.

They include TripyFox's ASTRO BOT run on an RTX 5090 with Windows, which triggered this update. They all agree: 00605 is reported on main, and none of them shows it with this change. No report shows a new VUID that comes from this change. JJenkx traced the pLibraries-06681 lines in their first AMD comment to the PR's old base, not to this change. Nobody asked for any code changes.

I made no code changes, so I ran no builds or tests. The only change is the PR description, which adds the Fixes: none item.

AI-assisted: yes

@StepFPV

StepFPV commented Nov 5, 2026

Copy link
Copy Markdown

Datapoint from an NVIDIA RTX 4080 SUPER on Windows 11 (WinLibs GCC 15.2.0 UCRT, Release, Khronos validation layer 1.4.367 loaded, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1):

  • main 1e24993fa3: agc_driver_prepared_exports logs VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 ("pAttachments[1] is different than pAttachments[0] and independentBlend feature was not enabled") 14 times across agc_driver_prepared_exports, dual_source_blend, reversed_order_blend, swap_alt_blend, unclamped_normalized_blend and color_logic_op; all six tests still pass.
  • main 1e24993fa3 + this PR (4433a62b3b): the same six tests pass and the message is gone (0 occurrences, no other VUID).

The message only shows in the tests' own output, so a ctest --output-on-failure log never lists it; it is in the JUnit <system-out> of every full GPU run I have (both vendors).

AI-assisted: yes.

@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Windows / AMD data point, since the earlier Windows runs here were NVIDIA. The change removes the independentBlend validation error on a Radeon RX 6700 XT, with no regression in the blend tests.

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Radeon RX 6700 XT (1002:73df), AMD driver 26.10.1, run with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and Vulkan validation layers 1.4.363 enabled, 3 runs each. Separate builds of main e772fb25cc and of head 4433a62b3b merged onto it (1adba04110, clean merge).

Build 5 tests VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 lines
main 5/5 pass, 3 of 3 runs 30
this PR 5/5 pass, 3 of 3 runs 0
  • The tests: agc_driver_prepared_exports (where the error comes from on main: "pAttachments[1] is different than pAttachments[0] and independentBlend feature was not enabled"), agc_driver_dual_source_blend, agc_driver_reversed_order_blend, agc_driver_swap_alt_blend and agc_driver_unclamped_normalized_blend.
  • Other errors: no other VUID- lines on either side; the layer loaded 15 times on each.
  • Full suite: in a full GPU suite run of main 1e24993fa3 on this card (4093 tests), this was the only VUID, from agc_driver_prepared_exports.

AI-assisted: yes.

@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Additional Linux/RADV title-frame evidence: this change removes VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 from a Hamster Playground (PPSA06652, 01.009.000) frame replay while retaining exact reference pixels for all three captured display buffers.

  • Baseline: pinned main 080dbd08c6f83be5a1768af7d3342d701bf34d21. Candidate: that main plus this PR's unchanged 4433a62b3bf6248df830994a255701c72581cc95, composed as 659b01a7a9233724b572c26b6920e04bd49bbcfb. These are frozen pins, not a claim about latest main.
  • Hardware: Linux, RX 6650 XT, RADV 26.2.6; real Khronos validation layer insertion confirmed in each arm. Same frozen libc/kernel and replay caller; only the AGC driver differs.
  • Focused gates: agc_driver_graphics, agc_driver_dual_source_blend, agc_driver_reversed_order_blend, agc_driver_swap_alt_blend: 4/4 on each, no skipped tests or VUIDs. Identical fixture source/headers and binaries used for both library selections, with ldd checks.
  • Same private recorded frame: baseline reports 00605; candidate reports zero VUID IDs, exits 0, compares 3 buffers with pixels_identical=1.0 and max_channel_diff=0. Both report 14 stale prologue registrations and zero failed registrations in the final summary. Candidate still logs four shader-output-not-consumed validation warnings; this is not a warning-free claim.
  • Replay setup limitation: the original very large prologue timed out before reaching the frame. Both compared replays use the same private experimental coalescing of exact repeated ABI-resolution records before FrameStart, retaining last occurrence order within non-ABI barriers. The original capture is unchanged. This is evidence for this frame and independentBlend, not proof of generic coalescing correctness. The replay caller has phase logging. No native FPS or loading-speed claim is made from its timings.
  • Complete harnesses used the host GPU FIFO; kernel import setting restored after every arm, no remaining native process at review.

Paired gate/replay logs, summaries, buffer hashes and library hashes, SHA-256 0e0021b2f69af61287b5033650b78961e3b09598471ad79fc0ab3a8123775862 (download verified). No capture memory, title binaries or shader payloads included.

AI-assisted: yes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.