Link: the synthesized geometry stage goes, both forms (the barycentric weights and the rate map's fan-out)
The translator built geometry stages in two forms that no Metal function asks for: - the barycentric weights: a fragment function's [[barycentric_coord]] read as varyings, which a generated geometry stage of each topology class wrote, on a device without fragmentShaderBarycentric; - the rate map's fan-out: a draw of a rasterization-rate-mapped pass's triangles once, a geometry stage emitting a copy of each per region, with its probe and its region-copy vertex variant. Neither form reached a guest. The runtime enables no geometryShader, so it refused the weights form already. It never sets BindShape::region_fan_out, and draws a rate-mapped pass region by region (the regions route, RateMapRegions, and region_viewports, which stay). Validation never set region_fan_out either. After this change, one form is left for each: - A fragment function that reads [[barycentric_coord]] reads the device's own BaryCoordKHR/BaryCoordNoPerspKHR. Without fragmentShaderBarycentric it is refused as Unsupported(Barycentrics) needing that feature alone; geometryShader is no longer offered. - A rate-mapped pass draws through the regions route. Rule 1: no precision note stops being raised. The fan-out's copies were a near-equivalent of the regions route, which carries its own note (RateMapRegions::precision), and the weights form raised none. The catalogue is unchanged. Removed: - pipeline::link::geometry (GeometryStages, the three classes' stages) and pipeline::link::fan_out, with their tests (link/tests/geometry.rs, link/tests/fan_out.rs) and tests/engine_region_fan_out; - bind::fan_out (the region table, the probe's word layout and its constants); - RegionFanOut and FanOutState; - the region_fan_out fields of GraphicsState, BindState, BindShape, VariantKey and RenderLinkInputs, and LoweringInputs::region_copies; - the region copy's lowering: StageIoPlan::region_copy, RegionCopy and the region table's declaration; - PushField::RegionBox and RegionProbe; - SyntheticBinding::RateMapRegions and RateMapFlags, and WriteSource::RateMapRegions and RateMapFlags; - RuntimeFact::SynthesizedGeometry, RenderPipeline::runs_stage and Linked::geometry; - IoRole::Barycentric with VaryingKey::barycentric and its key tag; - VkProperty::SubgroupGeometryStage; - the SPIR-V IR's geometry execution model, which only these stages produced: ExecModel::Geometry, OpEmitVertex and OpEndPrimitive, the InputPoints, InputLines, OutputLineStrip, OutputTriangleStrip and Invocations modes, ModelNeed::Geometry, EntryRule::GeometryModes and the builder's geometry ops; - from scripts/regen-spirv-grammar/items.txt, the opcodes EmitVertex and EndPrimitive, the execution model Geometry and those five execution modes. spv.rs is regenerated: the opcodes and the model stay as test-only values, which the test parser reads, and the modes go; - in validation, the census's geometry stage filter, the draw's runs_stage filter and the candidate's GEOMETRY stage arm. The census test that read three geometry stages from engine/bary_weights goes with them. The SPIR-V builder now marks only Position Invariant; ClipDistance was the fan-out's. band::plan loses its geometry flag, and takes the four SPIR-V helpers it shared with the geometry module. The binder's stage map takes a geometry stage as no render stage. Validation cases that executed either form: none. - Fan-out: no validation code sets region_fan_out. - Weights: two authored cases read [[barycentric_coord]], fa8b920d3cf3 and ae0a7e39b12f. Neither has a stored Vulkan observation on a profile without fragmentShaderBarycentric. fa8b920d3cf3 is observed on Metal and MoltenVK, and moltenvk-m3 has the feature. ae0a7e39b12f is observed on Metal only. Fourth user of GeometryStages: none. It was used by link, the compile API's splice, the binder's selection (through RuntimeFact::SynthesizedGeometry and GraphicsState::region_fan_out) and its own tests. Tests: - engine_stage_io_tail's weights test is now without_the_feature_the_weights_are_refused: on lavapipe, ANV's Iris Xe, NVIDIA's Pascal (each with geometryShader) and runtime-floor (without it), both barycentric entries are refused needing fragmentShaderBarycentric. - engine_target_indices checks each pipeline's stages valid where it counted geometry stages, and loses the_weights_stage_beside_a_vertex_layer_is_not_implemented: that combination is now the plain refusal above. - engine_amplification no longer counts geometry stages. - The binder's render stage test refuses a geometry stage. - The builder's invariant test refuses ClipDistance. - engine_rotated_weights' rotated draw runs on moltenvk-m3 and RDNA3's RADV, each with fragmentShaderBarycentric, where it ran on lavapipe through the weights form. - The fact mechanism test numbers its 100 RuntimeFact variants densely again (PrivateArena, which development added, takes 99). Bless due until the next named pin, where the M3 bless job takes them; nothing is blessed here: - tests::public_fixtures_engine (the inventory): every [[barycentric_coord]] cell on a profile without fragmentShaderBarycentric becomes Unsupported(Barycentrics) needing it alone, where it compiled through the geometry stages (with geometryShader) or offered GeometryShader as the alternative; - tests::golden_hashes, and pipeline::compile::tests::the_old_render_descriptor_key_keeps_its_value (the render key), as under the commit below: the profiles' fingerprints change; - the authored compile census. SEMANTICS_VERSION 2247 -> 2248 and ARTIFACT_FORMAT_VERSION 583 -> 584 are placeholders that main renumbers. SEMANTICS: a fragment function's weights and every rate-mapped variant change form. ARTIFACT: the codec loses the RegionFanOut, FanOutState, GraphicsState::region_fan_out, IoRole::Barycentric, RuntimeFact::SynthesizedGeometry, PushField, SyntheticBinding and VkProperty tags. RUNTIME_VERSION stays: the runtime's render-pipeline kind no longer reads region_fan_out, which it never set, and its SynthesizedStages doc names the bands alone. runtime-sources.sha256 keeps development's (land-pkt re-pins it), api_signatures and api_surface drop the removed items, and docs/REFUSALS.md is regenerated. API.md drops the geometry stages from RenderPipeline's stages, its barycentric bullet and its band bullet. ARCHITECTURE.md's link line drops pipeline::link::geometry, and the runtime README's Barycentrics gap names the feature alone. Consumer check (consumer_check.sh, consumer development b76d6ac4a9): region_fan_out, RegionFanOut, FanOutState, region_copies, region_copy, RateMapFlags, RegionBox, RegionProbe, SynthesizedGeometry, FEW_COPIES, PROBE_DRAW_WORDS, RegionCopies and runs_stage have 0 hits. GeometryStages appears in crates/reims-vgpu-c/link-order.txt only. fan_out's hits are the consumer's own event fan-out in crates/reims-vgpu/src/graphics/decode/cmdbuf.rs, not this module. Verified (jobs read): - m3-max-61801: the suites at this change's work in progress (4f1f934423); its real reds were the mechanism numbering and the rotated weights on amd-rdna3-radv, both fixed here; the render key reads bless-due. - At the stack's tip over this change (dvl-5 1fa4aed963 and dvl-6 92fe40c38f): 61978 and 61987, fmt, clippy in every configuration, Rustdoc, each feature alone, the API docs and the Windows clippy, green; 61891, the suites at dvl-4: 13 failures, each a bless-due golden above or development's own (the raster state test, the inventory's sample_fill rows); 61968, the lavapipe device suite of metal2vulkan-validation, 1483 of 1483, and public case qualification Match; 62042, the metal2vulkan-validation suite at dvl-5, 1378 of 1378 passed. - States-only play of this change's player (p-gd.zst) over 35 distinct streams on gem10 (61919), um870 (61924), ms01 (61967) and um790 (62004): 456,384 render and 91,972 compute states made, 0 refused, every stream exit 0. The msi stream (windrag-780m-b2) is not played: msi had no memory free. Rebased onto development4cf936ed4d(selidx landed as3ecf606aa8). The conflicts: the version lines; the mechanism test, where development added RuntimeFact::PrivateArena; runtime-sources.sha256, where development's is kept; and api_signatures.tsv and docs/REFUSALS.md, both regenerated (signatures.py --bless, refusal_surface.py) and differing from development by this change's items alone. The jobs above ran at the old base; the rebased tip's are in the report to main.
This commit is contained in:
1 parent
fa70528de2
commit
57855c6097
72 files changed
+200
-4247
No files matched your search
+5
-18
@@ -743,10 +743,7 @@ let pipeline = device.compile_render_pipeline(&descriptor, &Budget::standard())?
|
||||
|
||||
A `RenderPipeline` holds:
|
||||
|
||||
- `stages`: vertex, then fragment when rasterization is enabled, with three geometry stages
|
||||
before the fragment stage when the fragment function reads `[[barycentric_coord]]` on a device
|
||||
without `fragmentShaderBarycentric` (below). A `VkPipeline` takes the stages
|
||||
`RenderPipeline::runs_stage(at, topology)` says its topology runs;
|
||||
- `stages`: vertex, then fragment when rasterization is enabled;
|
||||
- `layout`: one pipeline layout for every stage;
|
||||
- `vertex_input`: Vulkan bindings and attributes. An attribute Vulkan cannot fetch as described is
|
||||
pulled in the shader instead, and so is every attribute on a device without
|
||||
@@ -866,18 +863,8 @@ Where Metal's rules differ from Vulkan's, the pipeline gives Metal's answer:
|
||||
- `[[barycentric_coord]]` reads `BaryCoordKHR` or `BaryCoordNoPerspKHR`, whose vertex order is
|
||||
Vulkan's first-vertex order and Metal's for every primitive type. A `float3` read takes the
|
||||
first two weights and computes the third as `1 - (x + y)` in `float`, as Metal does, not the
|
||||
device's own third lane.
|
||||
On a device without `fragmentShaderBarycentric` the weights are a varying instead: the pipeline
|
||||
carries a generated geometry stage for each topology class (points, lines, triangles, in that
|
||||
order), which writes `(1, 0)`, `(0, 1)` and `(0, 0)` at the primitive's vertices in their order
|
||||
and passes the vertex function's outputs, clip distances, point size and the primitive ID
|
||||
through, and a draw runs its class's. A `centroid` or `sample` qualifier reads the pixel
|
||||
center's weights, as Metal does. That needs `geometryShader`; without it, or for what a geometry
|
||||
stage cannot carry (tessellation, mesh pipelines, a vertex function's own layer or viewport
|
||||
index, amplification without `multiviewGeometryShader`, a written point size in a point draw
|
||||
without `shaderTessellationAndGeometryPointSize`, more varyings than the geometry limits), the
|
||||
pipeline is refused, naming what it needs. Measured on the Iris Xe (ANV), such a pipeline takes
|
||||
about 2.6 ms longer to create, and a geometry stage's presence costs about 15% of fill rate.
|
||||
device's own third lane. On a device without `fragmentShaderBarycentric` the function is
|
||||
refused, `Unsupported{Barycentrics}` needing the feature.
|
||||
- A vertex function stores `Layer` or `ViewportIndex` only where it writes the index the same at
|
||||
every vertex of a primitive, decided from its structure (computed from constants, `constant`
|
||||
memory, the instance, the amplification and per-instance attributes, as
|
||||
@@ -938,8 +925,8 @@ Where Metal's rules differ from Vulkan's, the pipeline gives Metal's answer:
|
||||
counter-clockwise one). A smooth varying and the clip distances are each endpoint's, a flat or
|
||||
integer varying the first vertex's. It needs `tessellationShader` (`Unsupported{WideLines}`
|
||||
needing it); a post-tessellation vertex function, a vertex function that writes a layer or
|
||||
viewport index, synthesized geometry stages, a fragment function that reads barycentric weights
|
||||
and multiview are not implemented.
|
||||
viewport index, a fragment function that reads barycentric weights and multiview are not
|
||||
implemented.
|
||||
- `graphics` also states what the runtime needs to record draws correctly: whether the fragment
|
||||
function reads flat inputs, barycentrics or its position's depth, whether the vertex function
|
||||
writes memory or a layer or viewport index, and which colors the function may write.
|
||||
|
||||
Reference in new issue
Block a user