Repository navigation
fix(agc): draw triangle strips through a geometry program with the last provoking vertex - #7883
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
|
Windows and AMD's own driver, a second AMD generation. AMD Radeon 860M (RDNA 3.5,
AI-assisted: yes (Claude Code) |
|
@thuanquang @MarcZX10 Positive title test for #7118 with this PR at TEKKEN DARK RESURRECTION (PPSA31371, v01.000.002) now gets past the previous triangle-strip refusal. In this session:
There was a several-minute black screen initially. It eventually progressed around the time I pressed a keyboard key, so I cannot distinguish loading/compilation time from waiting for input. Test environment: Windows 11 Pro 25H2, Radeon RX 7800 XT (16 GB), AMD Windows driver The supplied log has no previous triangle-strip refusal, driver-failure message or SIGABRT. It records shader Remaining observations: the log still contains 3,180 Full redacted runtime log (ZIP) All 3,777 log lines are retained. Local Windows paths and the executable name were redacted; guest virtual paths and diagnostic addresses remain. Test performed on my Windows PC; report preparation and log review were AI-assisted (Codex). Thanks for the fix! |
|
Intel and AMD Windows data: with this PR's test changes, the last-provoking-vertex geometry draws fail on Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
AI-assisted: yes (Claude Code) |
|
@cavazzatommaso thanks for the title run, and @LeandroLP23 and @savvaniss for the runs on the 860M, RX 9070 XT and UHD 770. I've added them to the description. |
59cabc5 to
dc93cf3
Compare
|
@DavidSamir #6741 and #7426 edit the same |
…st provoking vertex An RX 6700 XT hands a geometry shader odd strip triangle i as (i+1, i, i+2) with the last provoking vertex, which is the order the translator already uses, and since boykopovar#7374 last mode takes the flat outputs of the program's primitives from their last index. Keep the last-mode refusal for fans only, which reach the program as (i+1, i+2, 0) while the hardware gives (0, i+1, i+2). TEKKEN DARK RESURRECTION (PPSA31371) stops on such a strip draw. Co-Authored-By: Claude <noreply@anthropic.com>
dc93cf3 to
0bd8f61
Compare
|
NVIDIA, Windows. GeForce RTX 4080 SUPER, driver 616.92 (32.0.16.1692), Windows 11 Pro 26200, Ryzen 9 7950X3D, WinLibs GCC 15.2.0 r7, Release. Head
Khronos validation layer not run: the Vulkan SDK is not installed on this machine. AI-assisted: yes |
|
Checked the rebased head: strips now pass through a geometry program with the last provoking vertex, fans keep the refusal, the strip cases in the mesh and graphics tests fail on |
What
TEKKEN DARK RESURRECTION (PPSA31371) stops on a draw that feeds a 4-vertex
TRIANGLE_STRIPto a geometry program with the last provoking vertex (#7118, capture by @cavazzatommaso):#7374 kept that refusal because nobody knew in which order the hardware hands odd strip triangles to a geometry program in last mode (@MarcZX10 on #7118). I measured that on an AMD RX 6700 XT (gfx1031) (probe source and output), with a Vulkan geometry shader that records the vertex index of each input slot per primitive, with
VK_EXT_provoking_vertexset to first and to last:VK_AMD_shader_info) is byte-identical in both modes and for every topology (hashes and the strip dumps). It reads its three inputs from the packed vertex offsets in v0/v1, so the order comes from the fixed-function geometry engine followingPROVOKING_VTX_LAST, not from the driver's shader code. These are the same VGPRs the translator fills.firstVertex1 and primitive-restart draws and for 1024-triangle strips. A triangle-list draw gave (3i, 3i+1, 3i+2) in both modes, which validates the probe. The same orders are in Mesa's draw module.The translator hands a geometry program odd strip triangle i as (i+1, i, i+2) in both modes (
InstructionTranslator.cpp, the stripparityselect). Since #7374, last mode takes the flat outputs of the program's primitives from their last index, so a last-mode strip now gets the hardware's input order. This change keeps the refusal for fans only: the translator hands them over as (i+1, i+2, 0), and last mode needs (0, i+1, i+2). Strips whose pixel shader reads a vertex slot itself, and explicit per-vertex flat inputs, still throw.This is RDNA 2 on PC, not the console. The driver also runs these geometry shaders on the legacy (non-NGG) path, while the console runs geometry programs as NGG. On the NGG vertex-shader path, the provoking vertex is v[i] in first mode and v[i+2] in last mode, and back-face culling of strips was exact in both modes. With the winding kept, (i, i+2, i+1) and (i+1, i, i+2) are the only orders that fit, but that is inferred, not read from an NGG geometry shader. The debt entry says the console's order is not measured. First mode also differs: the hardware gives odd strip triangles as (i, i+2, i+1), while the translator gives (i+1, i, i+2). That is a separate fix, which needs the mode in the translator.
The
PA_SU_SC_MODE_CNTL.PROVOKING_VTX_LASTdebt entry is rewritten gap first and cut from 2825 characters onmainto 989. It now lists what is not measured on the console and what still throws.Tested
Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON.This head (
0bd8f6188a) is one commit onmain2c4b116da9, rebased over #7426, which changed the lines around this change inValidateProvokingVertex.main's generated-primitiveRequireis kept as it is now, without!BarycentricPatches(...)(barycentric patches return earlier), and its "strips or fans assembled for a geometry program" refusal is narrowed to fans, as before. ThePROVOKING_VTX_LASTdebt entry is one combined entry of 1000 characters: this PR's gap-first version plus #7426's statement that the generated barycentric tessellation stages give each corner the last vertex's flat values. On this head:main2c4b116da9'sPipeline.cppwith this PR's tests:agc_driver_graphicsandagc_driver_mesh_provoking_vertexfail withlast provoking vertex is unsupported for triangle strips or fans assembled for a geometry program.agc_driver_pixel_barycentric_emulationpass 3 of 3.main2c4b116da9) and B (this head), the same six tests: six of six pass on both, with noVUID-line and nowas not found but was requested. The only layer output on both is theWARNING-VkImageSubresourceRange-layerCount-compatibilitywarning described below.The results below were measured on the previous head
dc93cf31e.agc_driver_mesh_provoking_vertex, new strip case: a 4-vertexTRIANGLE_STRIPthrough the test's pass-through geometry program with a flat input. In last mode, triangle 0 takes vertex 2's colour and triangle 1 takes vertex 3's. In first mode, triangle 0 takes vertex 0's (first-mode triangle 1 is not asserted, see above).agc_driver_graphics(ProvokingVertexTests): in last mode, a strip through a geometry program now validates with no pixel shader, a flat input, a flat P10 input, a smooth input, and the title's four smooth per-vertex inputs. A strip whose pixel shader reads a vertex slot still throws, a fan throwslast provoking vertex is unsupported for triangle fans assembled for a geometry program, and both validate in first mode.Red on
mainwith only the test changes: both tests fail withAGC graphics: last provoking vertex is unsupported for triangle strips or fans assembled for a geometry program, the title's message.Negative controls:
agc_driver_mesh_provoking_vertexfails withtriangle strip, last provoking vertex, triangle 1 (the color of vertex 3): pixel (26, 48) channel 0 is 0, expected 255. The test pins the order.agc_driver_graphicsfails withexpected graphics rejection: last provoking vertex is unsupported for triangle fans assembled for a geometry program.Green:
agc_driver_graphics,agc_driver_mesh,agc_driver_mesh_provoking_vertex,agc_driver_mesh_provoking_layerandagc_driver_provoking_vertexpass 3 of 3.Khronos validation layer (vulkan-sdk-1.4.363.0),
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V, same RX 6700 XT, onmain38de0a470(other test files modified locally; none of these tests' sources), on fix(agc): draw triangle strips through a geometry program with the last provoking vertex #788359cabc57band on fix(shader): hand a geometry program strip and fan triangles in the order of its provoking vertex mode #7893606321886:agc_driver_graphics,agc_driver_mesh,agc_driver_mesh_provoking_vertex,agc_driver_mesh_provoking_layerandagc_driver_provoking_vertexpass on all three. No log reportswas not found but was requestedor anyVUID-error. The layer's only output is the sameWARNING-VkImageSubresourceRange-layerCount-compatibilitywarning inagc_driver_mesh_provoking_layeron all three trees.python tools/check_conventions.py --base origin/mainwith this title and body passes.Full
ctest --parallel 8 --timeout 120at this head: 1636 tests, 8 fail, none of them a provoking-vertex, mesh or geometry-program test:mainhas on this card (agc_driver_lds_mixed_width_atomicsfix(shader): release the LDS lock with an exchange and drop fences inside it #6976,agc_driver_lds_lock_budgetAGC: AMD device-backed LDS lock-budget case returns half of expected sum #7344,agc_driver_layered_volume_vertex_no_gplAMD Windows: GPL-mode cache failures (alpha/wave32 pass after local driver update) #4768);agc_driver_draw_cache_reuse_offandagc_driver_stencil_replay_no_gpl, which lose the device under their usual names and pass from renamed copies (AMD's per-executable pipeline cache, as in AMD Windows: GPL-mode cache failures (alpha/wave32 pass after local driver update) #4768);agc_trimmed_import, which fails the same way onmainhere (perf(agc): keep a host import across a split of its guest range #6499);log_macrosandlog_macros_timestamps, which fail only in this local build because ccache's base directory turns__FILE__into a relative path with backslashes.feat(agc): draw the last provoking vertex through the barycentric tessellation stages #7426 has landed, and this head is rebased over it (above). fix(agc): draw a last provoking vertex that no pixel input sees without the extension #6741 rewrites the same debt entry, so whichever of the two lands second needs a small rebase.
In the title (@cavazzatommaso, RX 7800 XT, AMD Windows driver 32.0.31041.1004, this head): TEKKEN DARK RESURRECTION gets past the refusal, plays the intro, renders and runs the mode-select menu, and completes a full fight, then starts the next. The log has no refusal, driver failure or abort.
Other GPUs, from reviewers, with
main'sPipeline.cppand this PR's tests as the red side:agc_driver_mesh_provoking_vertexskips there and onlyagc_driver_graphicsis red and green.maincecb540a6(@simnJS).Not tested: Linux, and the console.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code