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.