feat(agc): draw one-sample color targets beside a multisampled depth target with sample 0's coverage #8115

Merged
milescoviello merged 4 commits from upstream-pr/8115 into main 2026-10-22 21:38:33 +00:00
milescoviello commented 2026-10-19 22:26:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-19T22:26:58Z.


What

DecodeState refuses a draw that writes a one-sample color target beside a multisampled depth target: "a color target's sample count differs from the rasterizer's". The only one-sample color target it accepts under a multisampled rasterizer is merged coverage (overrasterization with no depth target), drawn through VK_NV_framebuffer_mixed_samples.

Ghost of Tsushima (PPSA02225) stops on such a draw. A diagnostic build logged its state: a one-sample R8G8B8A8_UNORM color target (CB_COLOR0_ATTRIB 0) and a 2x D32_SFLOAT_S8_UINT depth/stencil target (DB_Z_INFO.NUM_SAMPLES 1), 1920x2160, with PA_SC_AA_CONFIG 0x108001 (2 samples), MSAA_ENABLE set and DB_EQAA 0. Once that draw passed, a later draw into the same targets added PS_ITER_SAMPLE (PA_SC_MODE_CNTL_1 0x6030000) and a sample-interpolated input.

AMD's own Vulkan extension for this case, VK_AMD_mixed_attachment_samples, says "all samples are depth/stencil tested, but only the first color sample count number of samples get a corresponding color output". For one color sample, the pixel's color is written when rasterizer sample 0 is covered and passes the depth and stencil tests. With PS_ITER_SAMPLE every sample's invocation runs and is tested, and the color is sample 0's output. VK_NV_coverage_reduction_mode's TRUNCATE mode gives the same mapping ("raster sample i maps to color sample i"). It is also the rule the existing debt entry for a one-sample target under a multisampled rasterizer already takes from the AMD extension.

  • State gets truncatedCoverage. It is set for a one-sample color target when the depth target has the rasterizer's sample count (more than 1), the draw isn't overrasterized, and every color target is one-sample. A pixel shader that runs per sample keeps doing so.
  • The device takes TRUNCATE combinations from vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV with one color sample and depth/stencil samples equal to the rasterizer's, or, without the NV extensions, VK_AMD_mixed_attachment_samples for every depth and color sample count.
  • The pipeline gives its color attachments one sample and its VkAttachmentSampleCountInfoAMD/NV the depth sample count, and on NVIDIA it adds TRUNCATE coverage reduction. Without either extension, the draw throws a message naming them.
  • The flag is in the pipeline and draw keys and in the pipeline journal codec. With #7869's polygonMode on main, sizeof(State) becomes 792, and the journal's FileFormat goes to 7 (main's #5656 took 5 and #7869 took 6).
  • A single-sample scan into a multisampled depth target with a one-sample color target was refused; it is now accepted this way. Every sample of such a draw sits at the pixel center, so sample 0's coverage is the pixel's.

Stacked on #7985, which keeps VkAttachmentSampleCountInfoNV (with its depth/stencil count) when a pipeline is linked from libraries.

Tested

  • Rebased onto main f6075c2f4a as 4ba0175ba2, after #7948 grew State from 784 to 800 bytes. The one conflict was the size check in PipelineJournal.cpp, now 808: main's 800 plus this PR's 8. The build confirms it. On that head (Ubuntu 26.04.1, GCC 15.2, RTX 4070 Ti, 615.71.09):
    • The 40 tests matching ^agc_driver_graphics$|pixel_sample|pipeline_journal|pipeline_library|sample_count|mixed|msaa|multisample pass 3 of 3.
    • Khronos 1.4.363 over the same set: 40 of 40 on main and on this head. main reports VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285 twice, both from agc_driver_multisample_fill_host_only; this head reports none, and nothing new.
    • The journal format stays 7. #6612 and #8365 also take 7, so whichever lands later renumbers.
  • Ghost of Tsushima Director's Cut (PPSA02225) on @EagleBearerYS's test/ghost-9742-9717 (3ec696f7fe: #9533, #9742 and #9717), release libs, 20 GiB cap. Without this PR, warm and cold runs stop 246 s and 254 s in on a color target's sample count differs from the rasterizer's. With it merged (2620f8d62e), that refusal is gone, and both runs go on to #8121's case (a one-sample color target under a multisampled rasterizer without MSAA_ENABLE ...), 146 s and 267 s in. With #8121 as well, both reach the 600 s limit with no refusal (comment).

Ubuntu 24.04, GCC 13.3, Release, NVIDIA RTX 4070 Ti (595.99.02). The driver reports TRUNCATE and MERGE with one color sample and depth/stencil samples equal to the rasterizer's for 2 and 4 samples.

  • 2620f8d62e, for the llvmpipe CI failure @oneandonlydean found: ExpectTruncated now skips with truncated coverage not tested: the device has no two-sample depth targets (framebufferDepthSampleCounts) when framebufferDepthSampleCounts lacks 2, as on lavapipe, where main's depth sample count check refused the draw first. Under lavapipe (llvmpipe, LLVM 20.1.2), agc_driver_pixel_sample_coverage prints that line and passes 3 of 3, and the 33 tests pass. On the RTX 4070 Ti the truncated case still runs and passes, and the 33 pass 3 of 3. No CI lane reaches the truncated path: llvmpipe has neither mixed-sample extension and the Windows runner has no GPU. Its evidence is this card (VK_NV_framebuffer_mixed_samples) and @thuanquang's AMD run (VK_AMD_mixed_attachment_samples).
  • Rebased 10-21 onto main 275e896797 (7d215928d1), after #5656 and #7869 had each taken a journal format. The sizeof(State) assert is now 792 and FileFormat 7, and the 33 tests matching pixel_sample_coverage|pipeline_journal|pipeline_library|^agc_driver_graphics$|sample_count|mixed|msaa|multisample pass 3 of 3.
  • agc_driver_graphics, new cases in multisampledDepthTests:
    • The state above decodes as truncated coverage: 2 samples, 2x depth, one one-sample color target. The precheck accepts it.
    • The same state with PS_ITER_SAMPLE and the sample-interpolated input from the second draw runs per sample with sample 0's color. With a 4x color target it is still refused.
    • The single-sample scan into a 4x depth target with a one-sample color target now decodes with every sample centered.
  • agc_driver_pixel_sample_coverage, new truncated case. Two half-covering triangles are drawn at 2x beside a 2x depth target, writing their SAMPLE_COVERAGE mask into a one-sample target. With the standard 2x locations, one triangle's edge pixels cover only sample 0 and the other's only sample 1. The test requires that pixels covering only sample 0 are written and that no pixel covering only sample 1 is.
    • A per-sample case draws both triangles with PS_ITER_SAMPLE, writing each invocation's sample index from ANCILLARY. Every written pixel must hold sample 0's 0, and it must write exactly the pixels the first case wrote.
    • Passes 3 of 3 together with agc_driver_graphics.
    • Control: the same head with MERGE instead of TRUNCATE (7d2c2c867b) fails with "32 pixels that cover only sample 1 were written into the one-sample target".
  • AMD path, by @thuanquang (comment): RX 6700 XT (gfx1031), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, Release, main f9012eed0 against it with 7e5351d57 merged, with the Khronos validation layer. vulkaninfo lists VK_AMD_mixed_attachment_samples and neither NVIDIA extension, so VulkanDevice takes the AMD branch. agc_driver_pixel_sample_coverage -V prints the merged-coverage skip but not truncated coverage not tested, so the truncated-coverage checks ran through the AMD extension, and they pass 3 of 3. agc_driver_graphics passes 3 of 3 with and without this PR. Neither side has a VUID- message or reports the layer missing.
  • Windows 10 Pro 22H2, WinLibs GCC 15.2.0, Release, by @TheSovietWaffle (comment), head 7e5351d57: agc_driver_graphics and agc_driver_pixel_sample_coverage pass 3 of 3 on an NVIDIA RTX 3080 (617.42) and on an AMD Radeon RDNA 2 iGPU (1002:164e, 32.0.21045.5002). That run did not use the validation layer or a title.
  • Blackwell, by @wachi35676 (comment): RTX 5070 Ti (NVIDIA 617.42) and an AMD Radeon iGPU (AMD 2.0.353), Windows 11 26300, WinLibs GCC 15.2.0, Release, main 02fb1ce53 (with #8172) with 7e5351d57 merged. agc_driver_graphics, agc_driver_pixel_sample_coverage, agc_driver_msaa_dcc_state and msaa_dcc_clear_{2,4,8} pass 3 of 3 on each GPU. On the RTX 5070 Ti both coverage cases ran through the NV extensions, and on the iGPU the truncated case ran through VK_AMD_mixed_attachment_samples. A related set of 62 tests passes on each GPU.
  • Khronos validation layer (LunarG SDK 1.4.363): VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_driver_graphics$|pixel_sample|multisample|msaa|sample_mask|alpha_to_coverage|depth' -V on #7985's head c46005c996 and on this PR (7e5351d579). 54 of 54 pass on each, neither log reports the layer missing, and neither has a VUID- error.
  • ctest -R '^agc_' (before the per-sample case was added): 802 of 803 pass. agc_driver_storage_read_during_idle_store is a newer test on main that this tree doesn't have; it shows as Not Run.
  • Ghost of Tsushima (PPSA02225), on main with the PRs it needs to reach these draws (#7726, #7725, #7729, #6300 rebased, #7985 and a local separate-stencil-plane change). Without this PR it stops 62 s in on the first draw above. With the first version of this PR (no per-sample case) it ran to 147 s and stopped on the second draw. With this head it stops 55 s and 70 s in (two runs) at another refusal, a one-sample color target without MSAA_ENABLE under PS_ITER_SAMPLE, which is a separate rule. Those runs ended before the point where the second draw came up, so in the title only the first draw is confirmed past; the per-sample decode and GPU cases above cover the second.
  • tools/check_conventions.py --base upstream/main passes. One warning remains: the existing "Single-sample scan into a multisampled depth target" entry is over 1000 characters, and this PR only shortens it.

Not tested: RADV, and a title on AMD. The VK_AMD_mixed_attachment_samples path has run on AMD's Windows driver (@thuanquang's run above).

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: #7985
  • Fixes: none
  • Unblocks: PPSA02225 #4461
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99.02, Ubuntu 24.04; NVIDIA RTX 5070 Ti (617.42) and an AMD Radeon iGPU, Windows 11 (@wachi35676)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4928250303 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-19T22:26:58Z. --- ### What `DecodeState` refuses a draw that writes a one-sample color target beside a multisampled depth target: "a color target's sample count differs from the rasterizer's". The only one-sample color target it accepts under a multisampled rasterizer is merged coverage (overrasterization with no depth target), drawn through `VK_NV_framebuffer_mixed_samples`. Ghost of Tsushima (PPSA02225) stops on such a draw. A diagnostic build logged its state: a one-sample `R8G8B8A8_UNORM` color target (`CB_COLOR0_ATTRIB` 0) and a 2x `D32_SFLOAT_S8_UINT` depth/stencil target (`DB_Z_INFO.NUM_SAMPLES` 1), 1920x2160, with `PA_SC_AA_CONFIG` 0x108001 (2 samples), `MSAA_ENABLE` set and `DB_EQAA` 0. Once that draw passed, a later draw into the same targets added `PS_ITER_SAMPLE` (`PA_SC_MODE_CNTL_1` 0x6030000) and a sample-interpolated input. AMD's own Vulkan extension for this case, [`VK_AMD_mixed_attachment_samples`](https://docs.vulkan.org/refpages/latest/refpages/source/VK_AMD_mixed_attachment_samples.html), says "all samples are depth/stencil tested, but only the first color sample count number of samples get a corresponding color output". For one color sample, the pixel's color is written when rasterizer sample 0 is covered and passes the depth and stencil tests. With `PS_ITER_SAMPLE` every sample's invocation runs and is tested, and the color is sample 0's output. `VK_NV_coverage_reduction_mode`'s `TRUNCATE` mode gives the same mapping ("raster sample i maps to color sample i"). It is also the rule the existing debt entry for a one-sample target under a multisampled rasterizer already takes from the AMD extension. - `State` gets `truncatedCoverage`. It is set for a one-sample color target when the depth target has the rasterizer's sample count (more than 1), the draw isn't overrasterized, and every color target is one-sample. A pixel shader that runs per sample keeps doing so. - The device takes `TRUNCATE` combinations from `vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV` with one color sample and depth/stencil samples equal to the rasterizer's, or, without the NV extensions, `VK_AMD_mixed_attachment_samples` for every depth and color sample count. - The pipeline gives its color attachments one sample and its `VkAttachmentSampleCountInfoAMD`/`NV` the depth sample count, and on NVIDIA it adds `TRUNCATE` coverage reduction. Without either extension, the draw throws a message naming them. - The flag is in the pipeline and draw keys and in the pipeline journal codec. With #7869's `polygonMode` on `main`, `sizeof(State)` becomes 792, and the journal's `FileFormat` goes to 7 (`main`'s #5656 took 5 and #7869 took 6). - A single-sample scan into a multisampled depth target with a one-sample color target was refused; it is now accepted this way. Every sample of such a draw sits at the pixel center, so sample 0's coverage is the pixel's. Stacked on #7985, which keeps `VkAttachmentSampleCountInfoNV` (with its depth/stencil count) when a pipeline is linked from libraries. ### Tested - **Rebased** onto `main` f6075c2f4a as `4ba0175ba2`, after #7948 grew `State` from 784 to 800 bytes. The one conflict was the size check in `PipelineJournal.cpp`, now 808: `main`'s 800 plus this PR's 8. The build confirms it. On that head (Ubuntu 26.04.1, GCC 15.2, RTX 4070 Ti, 615.71.09): - The 40 tests matching `^agc_driver_graphics$|pixel_sample|pipeline_journal|pipeline_library|sample_count|mixed|msaa|multisample` pass 3 of 3. - Khronos 1.4.363 over the same set: 40 of 40 on `main` and on this head. `main` reports `VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285` twice, both from `agc_driver_multisample_fill_host_only`; this head reports none, and nothing new. - The journal format stays 7. #6612 and #8365 also take 7, so whichever lands later renumbers. - Ghost of Tsushima Director's Cut (PPSA02225) on @EagleBearerYS's `test/ghost-9742-9717` (3ec696f7fe: #9533, #9742 and #9717), release libs, 20 GiB cap. Without this PR, warm and cold runs stop 246 s and 254 s in on `a color target's sample count differs from the rasterizer's`. With it merged (2620f8d62e), that refusal is gone, and both runs go on to #8121's case (`a one-sample color target under a multisampled rasterizer without MSAA_ENABLE ...`), 146 s and 267 s in. With #8121 as well, both reach the 600 s limit with no refusal ([comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6346148575)). Ubuntu 24.04, GCC 13.3, Release, NVIDIA RTX 4070 Ti (595.99.02). The driver reports `TRUNCATE` and `MERGE` with one color sample and depth/stencil samples equal to the rasterizer's for 2 and 4 samples. - `2620f8d62e`, for the llvmpipe CI failure @oneandonlydean found: `ExpectTruncated` now skips with `truncated coverage not tested: the device has no two-sample depth targets (framebufferDepthSampleCounts)` when `framebufferDepthSampleCounts` lacks 2, as on lavapipe, where `main`'s depth sample count check refused the draw first. Under lavapipe (llvmpipe, LLVM 20.1.2), `agc_driver_pixel_sample_coverage` prints that line and passes 3 of 3, and the 33 tests pass. On the RTX 4070 Ti the truncated case still runs and passes, and the 33 pass 3 of 3. No CI lane reaches the truncated path: llvmpipe has neither mixed-sample extension and the Windows runner has no GPU. Its evidence is this card (`VK_NV_framebuffer_mixed_samples`) and @thuanquang's AMD run (`VK_AMD_mixed_attachment_samples`). - Rebased 10-21 onto `main` 275e896797 (`7d215928d1`), after #5656 and #7869 had each taken a journal format. The `sizeof(State)` assert is now 792 and `FileFormat` 7, and the 33 tests matching `pixel_sample_coverage|pipeline_journal|pipeline_library|^agc_driver_graphics$|sample_count|mixed|msaa|multisample` pass 3 of 3. - `agc_driver_graphics`, new cases in `multisampledDepthTests`: - The state above decodes as truncated coverage: 2 samples, 2x depth, one one-sample color target. The precheck accepts it. - The same state with `PS_ITER_SAMPLE` and the sample-interpolated input from the second draw runs per sample with sample 0's color. With a 4x color target it is still refused. - The single-sample scan into a 4x depth target with a one-sample color target now decodes with every sample centered. - `agc_driver_pixel_sample_coverage`, new truncated case. Two half-covering triangles are drawn at 2x beside a 2x depth target, writing their `SAMPLE_COVERAGE` mask into a one-sample target. With the standard 2x locations, one triangle's edge pixels cover only sample 0 and the other's only sample 1. The test requires that pixels covering only sample 0 are written and that no pixel covering only sample 1 is. - A per-sample case draws both triangles with `PS_ITER_SAMPLE`, writing each invocation's sample index from `ANCILLARY`. Every written pixel must hold sample 0's 0, and it must write exactly the pixels the first case wrote. - Passes 3 of 3 together with `agc_driver_graphics`. - Control: the same head with `MERGE` instead of `TRUNCATE` (7d2c2c867b) fails with "32 pixels that cover only sample 1 were written into the one-sample target". - AMD path, by @thuanquang ([comment](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6287262526)): RX 6700 XT (gfx1031), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, Release, `main` f9012eed0 against it with 7e5351d57 merged, with the Khronos validation layer. `vulkaninfo` lists `VK_AMD_mixed_attachment_samples` and neither NVIDIA extension, so `VulkanDevice` takes the AMD branch. `agc_driver_pixel_sample_coverage -V` prints the merged-coverage skip but not `truncated coverage not tested`, so the truncated-coverage checks ran through the AMD extension, and they pass 3 of 3. `agc_driver_graphics` passes 3 of 3 with and without this PR. Neither side has a `VUID-` message or reports the layer missing. - Windows 10 Pro 22H2, WinLibs GCC 15.2.0, Release, by @TheSovietWaffle ([comment](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6285923275)), head 7e5351d57: `agc_driver_graphics` and `agc_driver_pixel_sample_coverage` pass 3 of 3 on an NVIDIA RTX 3080 (617.42) and on an AMD Radeon RDNA 2 iGPU (`1002:164e`, 32.0.21045.5002). That run did not use the validation layer or a title. - Blackwell, by @wachi35676 ([comment](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6290676348)): RTX 5070 Ti (NVIDIA 617.42) and an AMD Radeon iGPU (AMD 2.0.353), Windows 11 26300, WinLibs GCC 15.2.0, Release, `main` 02fb1ce53 (with #8172) with 7e5351d57 merged. `agc_driver_graphics`, `agc_driver_pixel_sample_coverage`, `agc_driver_msaa_dcc_state` and `msaa_dcc_clear_{2,4,8}` pass 3 of 3 on each GPU. On the RTX 5070 Ti both coverage cases ran through the NV extensions, and on the iGPU the truncated case ran through `VK_AMD_mixed_attachment_samples`. A related set of 62 tests passes on each GPU. - Khronos validation layer (LunarG SDK 1.4.363): `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_driver_graphics$|pixel_sample|multisample|msaa|sample_mask|alpha_to_coverage|depth' -V` on #7985's head c46005c996 and on this PR (7e5351d579). 54 of 54 pass on each, neither log reports the layer missing, and neither has a `VUID-` error. - `ctest -R '^agc_'` (before the per-sample case was added): 802 of 803 pass. `agc_driver_storage_read_during_idle_store` is a newer test on `main` that this tree doesn't have; it shows as `Not Run`. - Ghost of Tsushima (PPSA02225), on `main` with the PRs it needs to reach these draws (#7726, #7725, #7729, #6300 rebased, #7985 and a local separate-stencil-plane change). Without this PR it stops 62 s in on the first draw above. With the first version of this PR (no per-sample case) it ran to 147 s and stopped on the second draw. With this head it stops 55 s and 70 s in (two runs) at another refusal, a one-sample color target without `MSAA_ENABLE` under `PS_ITER_SAMPLE`, which is a separate rule. Those runs ended before the point where the second draw came up, so in the title only the first draw is confirmed past; the per-sample decode and GPU cases above cover the second. - `tools/check_conventions.py --base upstream/main` passes. One warning remains: the existing "Single-sample scan into a multisampled depth target" entry is over 1000 characters, and this PR only shortens it. Not tested: RADV, and a title on AMD. The `VK_AMD_mixed_attachment_samples` path has run on AMD's Windows driver (@thuanquang's run above). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #7985 - [x] Fixes: none - [x] Unblocks: PPSA02225 #4461 - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99.02, Ubuntu 24.04; NVIDIA RTX 5070 Ti (617.42) and an AMD Radeon iGPU, Windows 11 (@wachi35676) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
TheSovietWaffle commented 2026-10-20 07:39:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-20T07:39:13Z.


Tested on RTX 3080 (NVIDIA 617.42) and AMD Radeon RDNA 2 iGPU (1002:164e, 32.0.21045.5002), Windows 10 Pro 22H2, WinLibs GCC 15.2.0, Release, head 7e5351d57: agc_driver_graphics and agc_driver_pixel_sample_coverage pass 3 of 3 on both GPUs. Not run: the validation layer, and no title.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6285923275 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6285923275). Originally posted by [TheSovietWaffle](https://github.com/TheSovietWaffle) on 2026-10-20T07:39:13Z. --- Tested on RTX 3080 (NVIDIA 617.42) and AMD Radeon RDNA 2 iGPU (`1002:164e`, 32.0.21045.5002), Windows 10 Pro 22H2, WinLibs GCC 15.2.0, Release, head `7e5351d57`: `agc_driver_graphics` and `agc_driver_pixel_sample_coverage` pass 3 of 3 on both GPUs. Not run: the validation layer, and no title. AI-assisted: yes (Claude Code).
milescoviello commented 2026-10-20 07:44:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T07:44:24Z.


@TheSovietWaffle thank you for running these on two vendors. The AMD run is the first one this PR has had: until now the VK_AMD_mixed_attachment_samples path had only been compiled. I added your results to the description and credited you. I worded the AMD part carefully, because a pass on AMD's Windows driver doesn't say which path the driver took, and RADV is still untested. If you can rerun agc_driver_pixel_sample_coverage with -V, its output would show whether the extension was used.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286008020 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6286008020). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-20T07:44:24Z. --- @TheSovietWaffle thank you for running these on two vendors. The AMD run is the first one this PR has had: until now the `VK_AMD_mixed_attachment_samples` path had only been compiled. I added your results to the description and credited you. I worded the AMD part carefully, because a pass on AMD's Windows driver doesn't say which path the driver took, and RADV is still untested. If you can rerun `agc_driver_pixel_sample_coverage` with `-V`, its output would show whether the extension was used. AI-assisted: yes (Claude Code)
thuanquang commented 2026-10-20 08:54:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-20T08:54:46Z.


@milescoviello the -V run you asked for, on a discrete RDNA 2 card: RX 6700 XT (gfx1031), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, Release. main f9012eed0 against main f9012eed0 with this head (7e5351d57, clean merge), ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, Khronos validation layer on.

  • vulkaninfo lists VK_AMD_mixed_attachment_samples on this device and neither VK_NV_framebuffer_mixed_samples nor VK_NV_coverage_reduction_mode, so VulkanDevice takes the AMD branch.
  • agc_driver_pixel_sample_coverage -V with this PR prints merged coverage not tested: the device lacks VK_NV_framebuffer_mixed_samples with merged coverage reduction, but not truncated coverage not tested: .... So ExpectTruncated drew through the AMD extension and its pixel checks passed. With the truncated-coverage path in place, the test passes 3 of 3.
  • agc_driver_graphics passes 3 of 3 with and without the PR.
  • Validation layer: 0 VUID- messages on either side and no was not found but was requested line. With VK_LOADER_DEBUG=layer the same setup logs Insert instance layer "VK_LAYER_KHRONOS_validation".

So the VK_AMD_mixed_attachment_samples path executes, and gives sample 0's coverage on this driver. RADV is still not checked, and I haven't run a title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287262526 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6287262526). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-20T08:54:46Z. --- @milescoviello the `-V` run you asked for, on a discrete RDNA 2 card: RX 6700 XT (gfx1031), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, Release. `main` `f9012eed0` against `main` `f9012eed0` with this head (`7e5351d57`, clean merge), `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, Khronos validation layer on. - `vulkaninfo` lists `VK_AMD_mixed_attachment_samples` on this device and neither `VK_NV_framebuffer_mixed_samples` nor `VK_NV_coverage_reduction_mode`, so `VulkanDevice` takes the AMD branch. - `agc_driver_pixel_sample_coverage -V` with this PR prints `merged coverage not tested: the device lacks VK_NV_framebuffer_mixed_samples with merged coverage reduction`, but not `truncated coverage not tested: ...`. So `ExpectTruncated` drew through the AMD extension and its pixel checks passed. With the truncated-coverage path in place, the test passes 3 of 3. - `agc_driver_graphics` passes 3 of 3 with and without the PR. - Validation layer: 0 `VUID-` messages on either side and no `was not found but was requested` line. With `VK_LOADER_DEBUG=layer` the same setup logs `Insert instance layer "VK_LAYER_KHRONOS_validation"`. So the `VK_AMD_mixed_attachment_samples` path executes, and gives sample 0's coverage on this driver. RADV is still not checked, and I haven't run a title.
milescoviello commented 2026-10-20 08:58:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T08:58:03Z.


@thuanquang thank you, this settles the AMD question. The vulkaninfo check plus the missing truncated coverage not tested line show the VK_AMD_mixed_attachment_samples branch ran, rather than just passing. It's in the description now, credited to you, and the "Not tested" line names only RADV and a title on AMD.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287319988 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6287319988). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-20T08:58:03Z. --- @thuanquang thank you, this settles the AMD question. The vulkaninfo check plus the missing `truncated coverage not tested` line show the `VK_AMD_mixed_attachment_samples` branch ran, rather than just passing. It's in the description now, credited to you, and the "Not tested" line names only RADV and a title on AMD. AI-assisted: yes (Claude Code)
wachi35676 commented 2026-10-20 12:19:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-20T12:19:07Z.


A short addition: results on current main (02fb1ce53, which includes #8172) with 7e5351d57 merged (clean), on a Blackwell NVIDIA GPU that hadn't been tested yet.

Setup: Windows 11 (26300), WinLibs GCC 15.2.0, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, no validation layer. The GPUs are an RTX 5070 Ti (NVIDIA 617.42) and an AMD Radeon iGPU (AMD proprietary 2.0.353, VK_AMD_mixed_attachment_samples).

  • agc_driver_graphics and agc_driver_pixel_sample_coverage pass 3 of 3 on each GPU. So do agc_driver_msaa_dcc_state and msaa_dcc_clear_2, _4 and _8, so the DCC import paths #8172 touched are not affected.
  • agc_driver_pixel_sample_coverage -V prints neither "not tested" line on the RTX 5070 Ti, so the merged and truncated cases both ran through the NV extensions. On the AMD iGPU it prints only merged coverage not tested: ..., so the truncated case ran through VK_AMD_mixed_attachment_samples, as in @thuanquang's RX 6700 XT run.
  • Related set of 62 tests (msaa, multisample, sample_mask, alpha_to_coverage, stencil, label, write_tracking, resident, pipeline_journal and so on): 62 of 62 pass on each GPU. agc_driver_stencil_ref_export skips on NVIDIA because the GPU has no stencil export.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6290676348 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6290676348). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-20T12:19:07Z. --- A short addition: results on current `main` (`02fb1ce53`, which includes #8172) with `7e5351d57` merged (clean), on a Blackwell NVIDIA GPU that hadn't been tested yet. Setup: Windows 11 (26300), WinLibs GCC 15.2.0, Release, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, no validation layer. The GPUs are an RTX 5070 Ti (NVIDIA 617.42) and an AMD Radeon iGPU (AMD proprietary 2.0.353, `VK_AMD_mixed_attachment_samples`). - `agc_driver_graphics` and `agc_driver_pixel_sample_coverage` pass 3 of 3 on each GPU. So do `agc_driver_msaa_dcc_state` and `msaa_dcc_clear_2`, `_4` and `_8`, so the DCC import paths #8172 touched are not affected. - `agc_driver_pixel_sample_coverage -V` prints neither "not tested" line on the RTX 5070 Ti, so the merged and truncated cases both ran through the NV extensions. On the AMD iGPU it prints only `merged coverage not tested: ...`, so the truncated case ran through `VK_AMD_mixed_attachment_samples`, as in @thuanquang's RX 6700 XT run. - Related set of 62 tests (msaa, multisample, sample_mask, alpha_to_coverage, stencil, label, write_tracking, resident, pipeline_journal and so on): 62 of 62 pass on each GPU. `agc_driver_stencil_ref_export` skips on NVIDIA because the GPU has no stencil export. AI-assisted: yes (Claude Code); results above were run on this machine.
milescoviello commented 2026-10-20 12:20:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T12:20:42Z.


Thanks @wachi35676. That's the first Blackwell run, and it confirms the paths #8172 touched still pass on top of it. I added it to the description.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6290704022 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6290704022). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-20T12:20:42Z. --- Thanks @wachi35676. That's the first Blackwell run, and it confirms the paths #8172 touched still pass on top of it. I added it to the description. AI-assisted: yes (Claude Code)
oneandonlydean commented 2026-10-21 11:01:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T11:01:04Z.


@milescoviello thanks for the rebase. 06f707be1 matches the version we checked: the patch is identical in all 12 files and adds no new title references to the docs.

Since then #7869 merged at 10:48 UTC and added polygonMode to State, which breaks this branch on current main in two ways:

  1. It doesn't compile. With #7869's field and this branch's truncatedCoverage, sizeof(State) is 792, so the static_assert(sizeof(State) == 784, ...) in PipelineJournal.cpp:38 fails. The text merge is clean, but the build isn't. We checked by compiling the merged file against main: main itself compiles, and planting a wrong size on main fails the same way.
  2. The journal format collides. Main's FileFormat is already 6, so this branch's 6 no longer marks the older journals. Please use 7 (PipelineJournal.cpp:47).

Could you rebase onto current main, set the assert to 792 and FileFormat to 7? Other open pull requests also change State and this value, so whichever lands second will need the next size and format. We'll check both at merge time.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6314318224 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6314318224). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T11:01:04Z. --- @milescoviello thanks for the rebase. `06f707be1` matches the version we checked: the patch is identical in all 12 files and adds no new title references to the docs. Since then #7869 merged at 10:48 UTC and added `polygonMode` to `State`, which breaks this branch on current main in two ways: 1. **It doesn't compile.** With #7869's field and this branch's `truncatedCoverage`, `sizeof(State)` is 792, so the `static_assert(sizeof(State) == 784, ...)` in `PipelineJournal.cpp:38` fails. The text merge is clean, but the build isn't. We checked by compiling the merged file against main: main itself compiles, and planting a wrong size on main fails the same way. 2. **The journal format collides.** Main's `FileFormat` is already 6, so this branch's 6 no longer marks the older journals. Please use 7 (`PipelineJournal.cpp:47`). Could you rebase onto current main, set the assert to 792 and `FileFormat` to 7? Other open pull requests also change `State` and this value, so whichever lands second will need the next size and format. We'll check both at merge time.
milescoviello commented 2026-10-21 11:02:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-21T11:02:55Z.


@oneandonlydean yes, I hit both a few minutes ago. The branch is rebased onto main 275e896797 as 7d215928d1, with the assert at 792 and FileFormat at 7 (the earlier 06f707be1a had moved it to 6, which then collided with #7869). It's queued to build and run the 33 tests matching pixel_sample_coverage|pipeline_journal|pipeline_library|^agc_driver_graphics$|sample_count|mixed|msaa|multisample 3 times. I'll push when they pass and fix the description's format line.

#6612, #6639, #8365 and #8542 took 6 as well. They're rebased onto the same main and now take 7; I'll post each one's results in its own thread.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6314350219 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6314350219). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-21T11:02:55Z. --- @oneandonlydean yes, I hit both a few minutes ago. The branch is rebased onto `main` 275e896797 as `7d215928d1`, with the assert at 792 and `FileFormat` at 7 (the earlier 06f707be1a had moved it to 6, which then collided with #7869). It's queued to build and run the 33 tests matching `pixel_sample_coverage|pipeline_journal|pipeline_library|^agc_driver_graphics$|sample_count|mixed|msaa|multisample` 3 times. I'll push when they pass and fix the description's format line. #6612, #6639, #8365 and #8542 took 6 as well. They're rebased onto the same `main` and now take 7; I'll post each one's results in its own thread. AI-assisted: yes (Claude Code)
milescoviello commented 2026-10-21 11:09:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-21T11:09:04Z.


Pushed 7d215928d1: rebased onto main 275e896797, with the sizeof(State) assert at 792 and FileFormat at 7. The 33 tests pass 3 of 3, and the description's format line is updated.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6314459024 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6314459024). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-21T11:09:04Z. --- Pushed `7d215928d1`: rebased onto `main` 275e896797, with the `sizeof(State)` assert at 792 and `FileFormat` at 7. The 33 tests pass 3 of 3, and the description's format line is updated. AI-assisted: yes (Claude Code)
oneandonlydean commented 2026-10-21 12:08:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T12:08:49Z.


@milescoviello the full CI run on 7d215928d is green on Windows, but on Linux agc_driver_pixel_sample_coverage fails after 0.21 s on llvmpipe:

merged coverage not tested: the device lacks VK_NV_framebuffer_mixed_samples with merged coverage reduction
AGC graphics: device does not support depth targets with the draw's sample count

The test passes on main. It's the new ExpectTruncated case, and the production path is right to refuse here. That case draws with a 2-sample D32_SFLOAT depth target, and llvmpipe's framebufferDepthSampleCounts is 1|4, with no 2. So main's existing check in Pipeline.cpp ("device does not support depth targets with the draw's sample count", line 331 on this head) throws before your truncated-coverage check at line 339 is reached. ExpectTruncated catches only messages containing "truncated coverage reduction", so it rethrows this one and the test exits 1.

The fix we'd expect is in the test only. Before drawing, ExpectTruncated should return false (not tested) when the device can't make a 2-sample depth target, i.e. framebufferDepthSampleCounts lacks VK_SAMPLE_COUNT_2_BIT, and print a line naming that limit, as it already does for the missing extensions. That's better than widening the catch, which would also hide that refusal on a device that should support it.

One more note for the Tested section: llvmpipe has neither VK_AMD_mixed_attachment_samples nor VK_NV_framebuffer_mixed_samples, and the Windows runner has no GPU, so no CI lane runs the truncated path even after this fix. The evidence for it is a run on a device with one of those extensions (NVIDIA, or AMD on Windows). If your own GPU run already covers it, please mention it there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315535941 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6315535941). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T12:08:49Z. --- @milescoviello the full CI run on `7d215928d` is green on Windows, but on Linux `agc_driver_pixel_sample_coverage` fails after 0.21 s on llvmpipe: ``` merged coverage not tested: the device lacks VK_NV_framebuffer_mixed_samples with merged coverage reduction AGC graphics: device does not support depth targets with the draw's sample count ``` The test passes on `main`. It's the new `ExpectTruncated` case, and the production path is right to refuse here. That case draws with a 2-sample `D32_SFLOAT` depth target, and llvmpipe's `framebufferDepthSampleCounts` is 1|4, with no 2. So `main`'s existing check in `Pipeline.cpp` ("device does not support depth targets with the draw's sample count", line 331 on this head) throws before your truncated-coverage check at line 339 is reached. `ExpectTruncated` catches only messages containing "truncated coverage reduction", so it rethrows this one and the test exits 1. The fix we'd expect is in the test only. Before drawing, `ExpectTruncated` should return false (not tested) when the device can't make a 2-sample depth target, i.e. `framebufferDepthSampleCounts` lacks `VK_SAMPLE_COUNT_2_BIT`, and print a line naming that limit, as it already does for the missing extensions. That's better than widening the catch, which would also hide that refusal on a device that should support it. One more note for the Tested section: llvmpipe has neither `VK_AMD_mixed_attachment_samples` nor `VK_NV_framebuffer_mixed_samples`, and the Windows runner has no GPU, so no CI lane runs the truncated path even after this fix. The evidence for it is a run on a device with one of those extensions (NVIDIA, or AMD on Windows). If your own GPU run already covers it, please mention it there.
milescoviello commented 2026-10-21 12:21:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-21T12:21:29Z.


@oneandonlydean thanks, agreed on all counts. 2620f8d62e does it in the test only. ExpectTruncated now returns its reason for not testing, and the first check is framebufferDepthSampleCounts without VK_SAMPLE_COUNT_2_BIT, which prints truncated coverage not tested: the device has no two-sample depth targets (framebufferDepthSampleCounts). The extension refusal keeps its own message, and the catch stays as narrow as it was.

It's queued to build and run under lavapipe and on the 4070 Ti, after the title run that has the machine now. I'll push when it passes.

On the Tested note: the truncated path does run on this machine. The RTX 4070 Ti has VK_NV_framebuffer_mixed_samples with truncated coverage reduction, and earlier @thuanquang ran the VK_AMD_mixed_attachment_samples branch on AMD; both are in the Tested section. I'll add that no CI lane can reach it.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315770395 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6315770395). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-21T12:21:29Z. --- @oneandonlydean thanks, agreed on all counts. `2620f8d62e` does it in the test only. `ExpectTruncated` now returns its reason for not testing, and the first check is `framebufferDepthSampleCounts` without `VK_SAMPLE_COUNT_2_BIT`, which prints `truncated coverage not tested: the device has no two-sample depth targets (framebufferDepthSampleCounts)`. The extension refusal keeps its own message, and the catch stays as narrow as it was. It's queued to build and run under lavapipe and on the 4070 Ti, after the title run that has the machine now. I'll push when it passes. On the Tested note: the truncated path does run on this machine. The RTX 4070 Ti has `VK_NV_framebuffer_mixed_samples` with truncated coverage reduction, and earlier @thuanquang ran the `VK_AMD_mixed_attachment_samples` branch on AMD; both are in the Tested section. I'll add that no CI lane can reach it. AI-assisted: yes (Claude Code)
milescoviello commented 2026-10-21 12:31:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-21T12:31:31Z.


Pushed 2620f8d62e. Under lavapipe, agc_driver_pixel_sample_coverage now prints truncated coverage not tested: the device has no two-sample depth targets (framebufferDepthSampleCounts) and passes 3 of 3, and the 33 tests pass. On the RTX 4070 Ti the truncated case still runs and passes, 3 of 3. The Tested section says which devices cover the truncated path, and that no CI lane does.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315957871 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8115#issuecomment-6315957871). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-21T12:31:31Z. --- Pushed `2620f8d62e`. Under lavapipe, `agc_driver_pixel_sample_coverage` now prints `truncated coverage not tested: the device has no two-sample depth targets (framebufferDepthSampleCounts)` and passes 3 of 3, and the 33 tests pass. On the RTX 4070 Ti the truncated case still runs and passes, 3 of 3. The Tested section says which devices cover the truncated path, and that no CI lane does. AI-assisted: yes (Claude Code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8115
No description provided.