SEMANTICS 2098 / RUNTIME 2244: a rate-mapped pass's region-by-region draws copy each region in the vertex function, scissored, so Equal depth matches the fanned-out route
Under RateMapRegionPolicy::FanOut a draw was drawn two ways: fanned out (a geometry stage's copy of each triangle per region, window position a*x + b*w through one viewport), or region by region (each region through its own Vulkan viewport). The two rounded a vertex's window position differently, so a pass testing depth Equal against depth the other route stored failed along whole surfaces: the consumer's black blotches on lit surfaces in Apple's Modern Rendering sample on the RTX 3090. The depth-Equal repro left 44,666 of 89,483 pixels red on lavapipe whenever the prepass and the Equal pass took different routes; 0 under Exact or on one route. Now on a fanning device the region-by-region draws take a region-copy variant (RegionFanOut::RegionCopies), with no geometry stage. Its vertex function computes region RegionFirst + DrawIndex of the table, stores its position through the region's line and four clip distances by the one emitter the fan-out stage's copies use (pipeline::link::fan_out::region_copy: NoContraction arithmetic, Position and ClipDistance Invariant), and its draw index as ViewportIndex. Each recording sets as many viewports as one multi-draw takes, every one the fan-out's over the render area, with each region's scissor at its index (bind::fan_out::scissors), so off-region triangles are scissored, not clipped. The settle keys the pipeline with the same viewport count (fan_out::copy_viewports). The variant replaces the regions variant, so no pipeline is added per state. A device without multiViewport, shaderOutputViewportIndex and shaderDrawParameters keeps the per-region-viewport route (FAST-PATHS known gap). Exact is untouched. New: bind::fan_out::scissors, WorkCounts::rate_map_region_copy_draws and rate_map_region_copy_recordings, PushField::RegionFirst; cache codec variants (artifact format). Verified (blotch, steelbrain/blotch 1fd68a45c0..16d5c2404f): - lavapipe at 16d5c2404f: rate_mapped_depth_equal + rate_mapped_fan_out 4/4, 0 red in all 10 depth-Equal lines (mixed pairs included), 0 pipelines made at the host step; clippy CPUICD, GPU and plain 0; rustdoc 0. Translator suite at 8ad673ffba 3562/3563, the one failure golden_hashes (re-blessed on development). - 780M and XTX at 8ad673ffba (differs from the tip by the settle fix only): 0 red in all 10 lines. E->E GPU cold/warm: 780M 4.99/4.97 ms against Exact 1.68/1.65; XTX 1.14 ms/650 us against 569/265 us. Creation (shader cache off): 780M 1.32 ms/state (Exact 0.92), XTX 1.30 (Exact 0.68). - Owed: the same numbers at development's tip without this change (the GS fan-out), the clip-distance probe, and the 780M/XTX runs at 16d5c2404f. SEMANTICS_VERSION 2097 -> 2098, ARTIFACT_FORMAT_VERSION 518 -> 519, RUNTIME_VERSION 2243 -> 2244.
This commit is contained in:
1 parent
522a8245e2
commit
b741f93b9e
39 files changed
+1508
-218
No files matched your search
+11
-1
@@ -5878,7 +5878,17 @@ each item named states the rule in full.
|
||||
and after them fanned out (`WorkCounts::rate_map_parted_draws`, the runs
|
||||
`rate_map_region_runs`, their triangles `rate_map_parted_region_triangles` and of those the
|
||||
ones the probe flagged `rate_map_flagged_triangles`); another flagged draw is drawn region by
|
||||
region. The
|
||||
region. On such a device every draw of the pass the fan-out's variant takes and does not fan
|
||||
out (the encoder's own, those the probe flags or does not probe) is drawn region by region
|
||||
through its region-copy variant where the device also enables `multiViewport`,
|
||||
`shaderOutputViewportIndex` and `shaderDrawParameters`, whose vertex function puts each vertex
|
||||
in its region by the instructions that put a fanned-out copy's, a region a recording or as many
|
||||
as a direct draw's multi-draw takes, each through a viewport over the render area and its own
|
||||
scissor (`WorkCounts::rate_map_region_copy_draws`, the recordings
|
||||
`rate_map_region_copy_recordings`), so the pass's routes rasterize a vertex at one
|
||||
position and a depth `Equal` test across them holds where both pipelines compute the position
|
||||
alike; a draw the variant does not take is drawn through each region's viewport
|
||||
(`docs/FAST-PATHS.md`, known gaps). The
|
||||
probe costs the host step a submission it waits for before the pass, which runs each probed
|
||||
draw's vertex function and geometry stage once and shades nothing (`WorkCounts::rate_map_probes`,
|
||||
`rate_map_probe_gpu_nanos`, the host's wait `rate_map_probe_wait_nanos`); a fanned-out draw
|
||||
|
||||
Reference in new issue
Block a user