Skip to content

test(agc): write the point size in the zero position point list draw - #10404

Open
CrimsonMac wants to merge 1 commit into
boykopovar:mainfrom
CrimsonMac:test/zero-position-point-size
Open

CrimsonMac wants to merge 1 commit into
boykopovar:mainfrom
CrimsonMac:test/zero-position-point-size

Conversation

@CrimsonMac

Copy link
Copy Markdown
Contributor

What

agc_driver_zero_position_vertex draws its P case as a point list, but it recompiles the vertex shader without ShaderVertexStageInfo::pointList and leaves State::vertexPoints false. So the shader writes no PointSize. Production sets both together for a point-list draw on the vertex path (State.cpp, vertex.pointList and result.vertexPoints).

Without maintenance5, a point-list pipeline whose vertex shader doesn't write PointSize is invalid, and the point size is undefined. The driver enables maintenance5 only together with graphics pipeline libraries, so with APS5_NO_GPL=1, or on a device without them, the Khronos validation layer reports:

VUID-VkGraphicsPipelineCreateInfo-topology-08773
vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] shader [VK_SHADER_STAGE_VERTEX_BIT] PointSize is not written to, but Pipeline topology is set to VK_PRIMITIVE_TOPOLOGY_POINT_LIST.

The test now sets pointList for the point-list case and vertexPoints to match. The shader validation accepts a PointSize output only when vertexPoints is set. The default point size is 1, so the drawn pixels and the assertions don't change. This changes one test fixture only.

Tested

Windows 11 IoT Enterprise LTSC 2024 (26100), WinLibs GCC 15.2.0 r7, Release, main dcd7e3a61. Khronos validation layer from the Vulkan-ValidationLayers nightly of 2026-10-23, confirmed loaded with VK_LOADER_DEBUG=layer, implicit layers disabled (VK_LOADER_LAYERS_DISABLE=~implicit~). ctest -R '^agc_driver_zero_position_vertex$' -V:

GPU GPL main this PR
RTX 4070 SUPER on passes, no VUID passes, no VUID
RTX 4070 SUPER APS5_NO_GPL=1 passes, 2x topology-08773 passes, no VUID
Radeon iGPU (gfx1036) on passes, no VUID passes, no VUID
Radeon iGPU (gfx1036) APS5_NO_GPL=1 passes, 2x topology-08773 passes, no VUID

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 GeForce RTX 4070 SUPER, driver 32.0.16.2101; AMD Radeon(TM) Graphics (Ryzen 5 7600 iGPU, gfx1036, 1002:164e), AMD Windows driver 32.0.21042.62; Windows 11 26100
  • AI-assisted: yes

@BKlaasWerkman

Copy link
Copy Markdown
Contributor

Red to green on Intel, a second vendor.

Setup: Intel Arc Graphics (Meteor Lake, 0x7d55, Windows driver 101.9150), Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Release. Head merged into main ec5b89a (clean merge). Environment: ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.363). The run uses ctest -R '^agc_driver_zero_position_vertex$' -V.

default APS5_NO_GPL=1
main passes, no VUID- passes, 1 × VUID-VkGraphicsPipelineCreateInfo-topology-08773
this PR passes, no VUID- passes, no VUID-

No log has was not found but was requested.

AI-assisted: yes (Claude Code)

@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 two fixture-state changes and the reported validation runs. The point-list test now keeps ShaderVertexStageInfo::pointList and State::vertexPoints consistent, and the matrix covers GPL on/off across NVIDIA, AMD and Intel with main/change comparisons. The reported VUID disappears on all three vendors; no blocking issue found. Hosted product jobs are skipped by workflow policy.

@github-actions github-actions Bot added the agc libSceAgc* label Oct 23, 2026
@adriadam10 adriadam10 self-assigned this Oct 24, 2026
@fogydes

fogydes commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

OK

  1. [read-only] I found no issue in the two changed point-list assignments: the shader metadata and vertexPoints state are enabled only for VK_PRIMITIVE_TOPOLOGY_POINT_LIST. The GPU runs and validation results in the PR description are [author-reported]; I did not reproduce them in this clone.
  2. [verified] python tools/check_conventions.py --base dcd7e3a61e8a361be622c34ca0f907c263331b87 passed in a scratch worktree.

Freshness envelope: head cd77aa3d762b4f1ab7b71b5545909a8134871a3d; merge-base dcd7e3a61e8a361be622c34ca0f907c263331b87; origin/main is 4,999 commits ahead of the merge-base; git merge-tree --write-tree origin/main pull/10404 exited 0 (clean).

Cross-PR ledger: tools/pr_overlap.py --branch pull/10404 found no overlap among 1,364 open PRs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head cd77aa3 merged onto main 6b48aee · tested 2026-10-31 06:24 UTC · 8 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 ✅ 808 passed · 3 failed (0 new, 1 also fail on main, 2 unstable on main) · 8 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 819 of 3,041 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 (396 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 34.8 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
Failing on main too (1, not counted against this PR)
agc_submit_progress_no_timeline
Validation IDs already present on main (4 IDs in 109 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (109 tests): agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_cmask_fast_clear, agc_driver_dcc_key_presync, and 101 more
VUID-vkCmdCopyImage-srcImage-01548 (8 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_plane_sampling_evicting, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (8 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_plane_sampling_evicting, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyBuffer-commonparent (1 test): agc_driver_depth_clear_hle
Skipped (8)
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_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
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
Reproduce
git fetch origin cd77aa3d762b4f1ab7b71b5545909a8134871a3d 6b48aee5d2ea9fce6155163d78f8ce8dc84f7827
git checkout 6b48aee5d2ea9fce6155163d78f8ce8dc84f7827 && git merge --no-ff cd77aa3d762b4f1ab7b71b5545909a8134871a3d
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.

@RNK123

RNK123 commented Nov 3, 2026

Copy link
Copy Markdown

On RX 9060 XT / RADV, the point-list validation error reproduces on main with graphics pipeline libraries disabled and disappears with this fixture change.

  • Main f6232fcfda70644495273f6b8dd88cf0603463d6, head cd77aa3d762b4f1ab7b71b5545909a8134871a3d, merge tree da17e253b57281445de4792a1f240af1b5757148.
  • agc_driver_zero_position_vertex, three serial runs per setting and tree: with default settings, main and candidate each pass 3/3 with no VUID; with APS5_NO_GPL=1, main emits one VUID-VkGraphicsPipelineCreateInfo-topology-08773 validation error per run, while the candidate has no validation error. CTest reports a pass in all runs, including those with the main validation error. No test skipped.
  • Reverting the two fixture assignments on the merged tree reproduced a source file byte-identical to main and the same VUID 3/3 with APS5_NO_GPL=1; restoring the candidate fixture produced no VUID 3/3. The fixture itself changes in this PR, so this is a before/after fixture comparison, not an unchanged-test production fix.
  • CachyOS Linux 7.3.1-1-cachyos, GCC 16.2.1, Release, SPIRV-Tools OFF; Radeon RX 9060 XT (1002:7590), RADV GFX1200, Mesa 26.2.5-arch3.1, Vulkan device API 1.4.354, loader and Khronos validation layer 1.4.363. GPU selection and Khronos layer insertion were logged. An unrelated LSFG implicit layer failed to load on both trees; Khronos loaded successfully.
  • This is a test-fixture validation result, not a game, PS5 hardware, full-suite or performance result.
Reproduction
cmake --build build-main --target agc_driver_zero_position_vertex_tests -j 4
export ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1
export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer
export VK_LAYER_PATH="$HOME/.local/share/anyps5-tester/vk-layers/usr/share/vulkan/explicit_layer.d"
ctest --test-dir build-main -R '^agc_driver_zero_position_vertex$' --timeout 120 -V
APS5_NO_GPL=1 ctest --test-dir build-main -R '^agc_driver_zero_position_vertex$' --timeout 120 -V

Run each setting three times on each tree and inspect validation messages rather than relying only on CTest's exit code.

AI-assisted independent hardware test run (gpt-6.1-terra, medium).

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.

7 participants