Repository navigation
Shaders: lane masks a traversal keeps as numbers - #1883
powplusplus wants to merge 1 commit into
Conversation
The ray-tracing passes keep the lanes still walking the BVH in a lane mask, and push it on an LDS stack as a number. A register that holds a mask on one path and a popped number on the other stopped the program when it was read as a number, and a mask join with a number coming in stopped it too. In compute, with console lanes: - a mask joined with a number is the mask's number, the console's own; - a number joined with masks is a mask, each lane taking its bit; - an edge along which no lane reads the register (one the compiler reuses) joins any mask, as it already joins any number.
|
Measured offline on the title's shaders (the method in #1247): merged onto main +21 programs, 0 lost. On main they failed with "a register joining a lane mask and data, read as data" (16 of the 40 still failing for that reason) and "a lane-mask join of an untracked mask" (5). It also merges cleanly together with #1989, #1065 and #1971: the four together give +1,683 programs and 0 lost, and |
|
An independent offline count, with one addition to @zed6000's: what the programs this PR does not finish stop at next, and the result together with #2027. Method:
The 40 programs
The 5 programs at Not checked here: the value a joined mask reads on a GPU (the PR's own VALU test covers that; I ran no test), and pipeline creation. A local copy of the title's shader archive was used for these counts, offline; only counts, program names and refusal reasons are given. AI-assisted. |
|
Automated triage for the maintainers. Merge candidate. In Notes:
CI: no check runs on this head. Generated by Claude Code |
The ray-tracing shadow passes keep the lanes still walking the BVH in a lane mask, and push that mask on an LDS stack as a number. On main they stop at "a register joining a lane mask and data, read as data" (a register that holds the mask on one path and a popped number on the other, read as a number) or at "a lane-mask join of an untracked mask".
In compute, with console lanes (
fill_phis):mask_numberfor one holding lanes elsewhere), as the console holds it;never_taken,dead_on_edge) joins any mask, as data joins already take any number there.Results
translate --validateover shaders.rpf against70564ae: 45 more compute programs emit and validate (2,621 to 2,666), none lost.CS_RTShadowTrace32HQand its temporal, 1/2, 1/4 and 1/8 RPP, FarOnly and tiled variants (20),CS_RTDistantShadowTrace*_Tiled(4),CS_RTDistantLODLightShadow,CS_TraceShadowRays_*(Checkerboard, Eighth, Quarter, Half, FullAdaptive),CS_RaytraceShadows_Shared,CS_LaserLightShadowRaytracing.CS_RaytraceVBuffer_ShaderBinningand_RayBinning_ShaderBinning_Shared(with and without far),CS_ScreenProbes_TraceRays_RayBinning_BVH_Shared_ShaderBinning(2),CS_DeferredGather_Shared_Wave32,CS_ComputeClosestDepth.CS_Subdivision_*(5).Under vkd3d-proton (RTX 3080, Proton), 35 of the 45 hang pipeline creation, each created on its own with a 120 s limit; 10 create pipelines. #1885 fixes the hang (one back edge per loop header, a larger stack for pipeline threads): with both, the 35 of the 45 run so far all create pipelines, 30 of them ones that hung.
Testing
vccon one path and a number on the other and is read after the join; hardware adapter and WARP. main refuses it.cargo test -p victory-shaderunder Proton (RTX 3080 and WARP): 205 passed. The 5 that fail (stub_pipeline_is_created, three insemantics_tests,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros) fail on main there too.