5f5d3ea4550d650c109f98be4e25eb514e5000ef
1979
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2c5573d598 |
rt: a refused pipeline state's Error::Translation names its functions
What: Error::Translation is now Error::Translation { error, functions }. new_compute_pipeline_state
and new_render_pipeline_state fill `functions` at their public entry with each Function stage's own
name in its library (FunctionInfo::name), in stage order (the vertex function before the fragment
function), and the Display prints them: "the translator made no pipeline of a, b: ...". A compiled
stage has no name; a sampler state, a device and a dispatch's late kernel variant name none, and
then the text is as before. It is a diagnostic for the program's log, documented as the text of
the NSError Metal's failed creation gives; no lowering or decision reads it.
Why: the consumer logged only the first refusal of each kind, which hid 6 of one 3D modelling
app's 8 refused kernels; with the names it logs every refused create.
How: the existing creation bodies moved to private compute_pipeline_state and
render_pipeline_state, whose translator errors name no function (Error::translation, for map_err),
and the public entries map them through Error::of_stages. The one-token map_err edits are in
pipeline.rs, render.rs, sampler.rs:371 and device.rs:1290 and 1294.
Same commit: 10 rt test patterns; validation's candidate/platform/runtime.rs (2),
candidate/tests/engine_compute.rs, replay/new_runtime/mod.rs and replay/new_runtime/tests.rs (3);
conformance's rt_side.rs, rt_side/states.rs and case.rs. Conformance's Failure::of_rt records the
error's text without the names (they are the case's own functions), so the 484 answers in
known-gaps-rt.tsv stay as they are. The rt README's compute and render state entries say what
`functions` holds; REFUSALS.md and api_signatures.tsv are regenerated (one changed signature).
Consumer break to follow: reims-vgpu builds or matches rt::Error::Translation(..) at 17 sites,
all in crates/reims-vgpu-vulkan/src/rt_platform/: unbuilt.rs (7), diag.rs (5), library.rs (3),
pipeline.rs (1), argument.rs (1). Each becomes Translation { error, .. } in a match, or
Translation { error, functions: Vec::new() } where it builds one.
Tests (device cfgs): every_device_names_the_function_of_a_refused_compute_state (translate.rs):
a compute state of the vertex function colored_vertex is Error::Translation with functions
["colored_vertex"], and its text starts "the translator made no pipeline of colored_vertex: ".
every_device_refuses_the_patch_draws_it_does_not_build (patch.rs) now also holds the
control-point index type's Tessellation refusal to functions ["tess_triangle_points",
"tess_fragment"] and to the text that names them in that order. Without the entry mapping both
fail on an empty `functions`.
|
||
|
|
62b3e5a250 |
rt: the render encoder's use_resource, and a draw after a declared write of a texture with no storage element is Gap::StorageElement
What: RenderCommandEncoder::use_resource is useResource:usage:stages:, its plural and their
deprecated forms without stages. The command buffer keeps the buffer or the texture until it
retires and nothing is recorded: every resource is resident to every function, and the pass's
barriers already order its draws. A usage that writes a texture (or a view of one) made for
shader writes with no storage element marks the encoder, and every later draw whose vertex or
fragment function may reach a texture through its storage image beyond its slots
(PipelineInterface::unbound_storage_textures: an argument buffer's write or read_write texture, a
resource ID) is Gap::StorageElement with no slot, as the compute encoder's dispatch already is.
Before this, such a draw ran and Vulkan dropped the writes Metal makes. The declaration
invalidates the encoder's held draw facts, so a draw of an unchanged state and bindings after it
is checked again.
Also: the three redundant explicit links in new_render_pipeline_state's docs (private rustdoc
-D warnings, from
|
||
|
|
a134775713 |
Simd: Metal's own lockstep, fragment and vertex simdgroups, and full quads go
DriverDeviation::SimdgroupLockstep, MetalFragmentSimdgroups, MetalVertexSimdgroups and MetalFullQuads were never taken, and neither were their VkProperty twins and codec tags. Device::from_queries enables no Metal* property, and no committed profile carries one. The forms that only they reached go with them: - Lockstep. Kernel ordering no longer leaves out a barrier that only emulated simdgroups make exact on a device that runs a simdgroup in lockstep. This removes OrderKey's device bit and the Decision's count, air::Lockstep::device in metal2vulkan-air, SimdPlan::device_lockstep, the census name barrier.lockstep.device (simd::DEVICE_LOCKSTEP) and the module's VkProperty::SimdgroupLockstep requirement. Every such place takes its barrier and tier as on every real device. - Fragment simdgroups. SimdPlan::metal_lane and its requirement go. A fragment's [[thread_index_in_simdgroup]] is the device's grouping's lane on every profile, and the SimdWidth refusal no longer offers VkProperty::MetalFragmentSimdgroups as an alternative: it needs the 32-lane width alone, as subgroup::tier's own width refusal does. docs/REFUSALS.md's row and the fixture inventory's 24 refusal cells on the eight gsm2_fragment_lanes rows change with it. - Vertex simdgroups. The prefix lane goes: SimdPlan::prefix_lane, its Private word and entry hook (simd::emit_entry), and SubgroupRequirement::metal_vertex_simdgroups with its swap of SubgroupStage(Vertex). A vertex function's simdgroup operations need the stage listed, as on every real device. - Full quads. SimdPlan::metal_full_quads and its requirement go. A fragment whose group operations count the helpers needs shaderQuadControl, as on every real device. Rule 1: no note stops being raised. FragmentSimdgroupGrouping was withheld only on a MetalFragmentSimdgroups profile, so on no real device, and it is now raised wherever the function's answer reads the simdgroup's members, on every profile. Its catalogue entry already said "on every device", and its doc in artifact.rs now says so too. The other three forms carried no note. Their inputs now take a barrier, a refusal or the device's grouping, as on every real device. The catalogue loses no entry. Validation: c3.rs's FragmentSubgroupUnderTwoQuads doc clause becomes "every device takes that note, so the gap's answer is always announced". That is the one validation file that named one of these deviations. It used the deviation only to explain why the gap's answer is always announced, because the allowance code never reads the deviation. Nothing else in c3.rs changes. The fixture README's gsm2_fragment_lanes row drops the Metal lane and the gone driver_deviations lane, and its gsm2_simd_products and gsm2_vertex_votes_shifts rows drop MoltenVK's measured vertex classes. Tests: the asserts that no module requires one of these properties, or counts barrier.lockstep.device, go with them. This covers engine_simd_lockstep's two emulated-tier tests, its no-barrier lists and LOCKSTEP_NAMES, engine_simd's fragment-lane test (whose narrow refusal now needs the width alone), and engine_matmul2d's tier assert, which held on every profile once no profile had the property. Also going: device/tests/subgroup.rs' a_measured_vertex_stage_states_its_fact_in_place_of_the_stage and the requirement literals' field. engine_fragment's simd_after_discard takes quad control alone. SEMANTICS_VERSION 2241 and ARTIFACT_FORMAT_VERSION 579 are placeholders that main renumbers. SEMANTICS: the profile's fingerprint, the SimdWidth refusal's needs and the census of the same input change form. ARTIFACT: the codec loses four VkProperty tags and the requirement's field. RUNTIME_VERSION stays, because the pinned sources' edits remove forms and fields no profile reached. runtime-sources.sha256 takes the new hash, and api_signatures is blessed. Consumer check (consumer-uses.sh, consumer development a414607f95, 62 refs): SimdgroupLockstep, MetalFragmentSimdgroups, MetalFullQuads, metal_vertex_simdgroups and DEVICE_LOCKSTEP have 0 hits in code. MetalVertexSimdgroups has 0 hits on development. It is used in crates/reims-vgpu-vulkan/src/gpu/encode_render/tests/metal_tests.rs on 36 of the consumer's steelbrain/* branches younger than a day, a file its development does not have. air::Lockstep::device: the consumer's development names no `lockstep` at all. Verified: m3-max-61467 (homelab-gem10-1): fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd) and Rustdoc green at the old base (m3-max-61463 before it failed on four unused test imports, removed). Rebased onto development |
||
|
|
305d85a2a2 |
Sampler: Metal's own sampler and the cube-gradient routes go
DriverDeviation::MetalSampler, CubeGradientRoute and GraphicsCubeGradientTangents, with VkProperty::MetalSampler and its codec tag, were never taken: Device::from_queries enables no Metal* property and always inserts VkProperty::DeviceSampling, and no committed profile carries a Metal* property. ProfileFields::cube_gradients, with CubeGradients and CubeGradientRoute, had one reachable value (Vulkan's rule for both stages), so it goes too. The forms only they reached go with them: - Cube gradients: CubeFootprint::Metal and ::Projected (MoltenVK's gradientcube and its graphics fixup); a cube's explicit gradients take Length, Face or Word by the sampler's anisotropy alone, and CubeGradientFootprint is raised wherever the shader does not take Metal's level and taps itself. - The sampler requirement: SamplerFamily::metal_sampler merges into device_sampling. Every sample, gather and LOD query, the hoisted no-bias samples and BiasReach::Metal's included, requires VkProperty::DeviceSampling and records DeviceSampling, as on every real device. - The half-texel routine (lower/texture/half.rs) and everything only it read: HalfClass, half_class and heap_half_class, TexelLanes and TexelOrigin, the texel argument of texel_value and held_value, sample_lanes and word_reads_one, Sampling::one_texel's word forms (one_texel now answers whether an access may read one texel, which float_texel_notes reads) and half_texel, SamplerSlot::texels, SlotPlan::half_format and unmeasured, TexturePlan::heap_half, the declarations half_format, half_routine and plain_half, the module's table of heap texel classes (AccessPlan::heap_class, declare_heap_classes, heap_texel_class, HEAP_CLASS_WORDS, and texel_format::heap_classes, whose tests now read the layout itself), texel_round::f32_to_half_from_even, NoteOn::Unmeasured, SpecKey::UnmeasuredTexels and PlainHalfTexels with their plan answers, TexelFormat::YCBCR_8192, MEASURED_ON_METAL_SAMPLER, unmeasured_on_metal_sampler and plain_on_metal_sampler, and the identity-domain refusal of a heap half sample that only a Metal-sampler profile met. - The Metal sampler's YCbCr filter note (linear::filter_note and metal_filtered_ycbcr), with NoteOn::HeapYCbCr and ArgumentSamplers, SpecKey::HeapYCbCrTextures and FilteringArgumentSampler, their plan answers and TexelFormat::two_plane_ycbcr. - The anisotropic not-mipmapped clamp [0, 0] (vk_sampler's own_anisotropic) and its note's source (anisotropic::own_not_mipmapped); PrecisionNote::NotMipmappedAnisotropicFilter, its codec tag, conformance Degradation and validation allowance go with its only source. - The rest: device_texels, device_decode's and fragment/color.rs's Metal decode, bind::plan::resources' swizzled_packed profile test, and border_read's metal_sampler (and device_opaque_black's format argument, which nothing then read). Rule 1, per note the commits stop raising: every one is case (b), no difference goes silent. - filter_note's HalfSampleFilter and FloatSampleFilter (slot clauses on a bound two-plane YCbCr format and the bound sampler word, heap clauses on HeapYCbCrTextures and FilteringArgumentSampler): raised only on a profile with VkProperty::MetalSampler, so on no real device. Such a filtered sample goes to the device's own sampler, and every sample, gather and LOD query sets device_sampling, so the stage records DeviceSampling, whose entry covers the device's filter of a two-plane texture. The in-place Y'CbCr model's HalfSampleFilter and FloatSampleFilter stay as they were. - NotMipmappedAnisotropicFilter: raised only under own_not_mipmapped, which needed MetalSampler. An anisotropic sample on a device with samplerAnisotropy goes to the device's sampler (DeviceSampling, its not-mipmapped clamp [0, 0.25] the device's footprint), and one without it keeps AnisotropicFilter or DeviceAnisotropicFilter, as on every real device. - The rest only widen: HalfTexelConversion (now outright at every half read, sample and gather, where the Metal-sampler profile tested the bound class), DeviceTexelConversion, SrgbTexelDecode and CubeGradientFootprint, each withheld only on a Metal-sampler or Metal-route profile. The precision-note catalogue loses NotMipmappedAnisotropicFilter alone; the docs of GradFromBias, HalfTexelConversion, HalfSampleFilter, SrgbTexelDecode, FloatSampleFilter, DeviceSampling and DeviceTexelConversion lose their Metal-sampler clauses (docs/API.md's entries already stated the one rule). Validation: comparison.rs's allowance list loses NotMipmappedAnisotropicFilter (unbounded), which no device raised; its HalfSampleFilter and FloatSampleFilter reasons now name the in-place model, their class unchanged (unbounded). No validation file names a deleted DriverDeviation. Also, from the planner: the citation of VUID-RuntimeSpirv-NonUniform-06274, which spec 1.4.366 no longer has, becomes VUID-RuntimeSpirv-None-10148 and VUID-RuntimeSpirv-subgroupSize-10149 in spirv/builder/ops/memory.rs, spirv/ir/module.rs (twice), spirv/serialize/mod.rs and the doc of non_uniform_elements_are_decorated_through_what_carries_them. Comments only. Tests: each deleted form's tests go with it: lower/arith/tests/half_texel.rs (the routine, its plain arm, and the steps that bounded the Metal-sampler note) with arith/tests.rs' quantize_flush_of, which only it read, f32_to_half_from_even_is_exact_on_every_tie, the projected-footprint test and the swizzle helper of face/tests/anisotropic.rs, texel_format's ycbcr_8192, wide16 and metal_sampler_s_read_bits tests, the format version 326 round trip, and the routes' asserts in engine_handles, engine_heap_binder and engine_sampler_unk. The rest assert the device's sampler on every profile: half_reads_round_their_texel_to_nearest_even (was half_reads_convert_by_the_bound_format), heap_half_texels_round_the_device_s_texel (was heap_half_texels_convert_by_the_handle_s_class), heap_linear_samples_are_the_device_s (no FloatSampleFilter, outright or specialized), engine_sample_coordinates' requires_the_sampler, engine_bias_reach, engine_graphics_binder's border test, engine_srgb_decode, engine_sampler, the routines test, the merged-members round trip, and metal/sampler.rs' and format/tests.rs' opaque-black calls. SEMANTICS_VERSION 2239, ARTIFACT_FORMAT_VERSION 577 (placeholders; main renumbers). SEMANTICS: the profile's fingerprint and the notes of the same input change form. ARTIFACT: the codec loses the VkProperty, the PrecisionNote and four SpecKey tags. RUNTIME_VERSION stays: the pinned sources' edits (device/, bind/plan/resources.rs and slots.rs, metal/sampler.rs, cache/codec.rs) remove forms and keys no profile reached, so no run changes; runtime-sources.sha256 takes the new hash. api_signatures is blessed; docs/REFUSALS.md and the coverage are unchanged. Consumer check (consumer-uses.sh, consumer development 2040502291, 62 refs): CubeGradientRoute, GraphicsCubeGradientTangents, CubeGradients, cube_gradients, FilteringArgumentSampler, HeapYCbCrTextures, PlainHalfTexels and UnmeasuredTexels 0 hits (code). MetalSampler and NotMipmappedAnisotropicFilter: 0 hits on development (its answer.rs names neither, and it has no gpu/rgbx.rs); named in crates/reims-vgpu-vulkan/src/answer.rs and gpu/rgbx.rs on 36 of the consumer's steelbrain/* branches younger than a day. Verified: m3-max-61441 (msi-laptop, this tree): fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc green; tests 5861 of 5863 passed. The two failures: golden_hashes_match_the_table, every one of its 29536 cells under a changed profile fingerprint (re-blessed on development at a named pin), and the_old_render_descriptor_key_keeps_its_value, left unpinned until the next named pin. Rebased onto development |
||
|
|
efa911bc00 |
Arith: the Metal arithmetic deviations and the profile's float-function and NaN-encoding fields go
DriverDeviation::MetalFloatFunctions, MetalCanonicalNans, MetalFloatDenormals, MetalUnaryDenormals, MetalMinMax, MetalHalfFma, MetalPackConversions, MetalHalfArithmetic, MetalNanMoves and MetalHalfConversion, with their VkProperty values and codec tags, were never taken: Device::from_queries enables no Metal* property, and no committed profile carries one. Their forms go, and so do the two profile fields each left with one reachable value: - ProfileFields::float_functions and FloatFunctions (only Native was reachable): the device's functions are never Metal's own. Gone with it: pipeline::EntryMath (public), the entry-math argument of PrecisionNote::of_float_operator and of_math_call, libm's Mode and its device_answers and device_near_equivalent, spirv's ProductForm (a product is an OpFMul, its negative-zero Fma form gone), and arith's OpNotes, MetalOwn and metal_functions_in (a call's notes are a BTreeSet<PrecisionNote>). - ProfileFields::nan_encoding and NanEncoding (only Native was reachable): NanAnswer's device_answers and nan::encoding go; every NaN Metal answers is noted NativeNanEncoding. - Denormals: denormal.rs keeps covered() alone (Covered, device_flushes, unary_kept and moves_sign go); every f32 denormal left to the device is noted DeviceDenormals. - MinMax: Metal's minimum and maximum family is the device's NMin, NMax and NClamp, noted NativeMinMax (device_min_max goes). - MetalHalfFma: its arm and test go. - Pack conversions: every air.pack and air.unpack is noted DevicePackConversion (pack::measured and ArithPlan::metal_packs go). - Half arithmetic: the device's 16-bit half + - * is taken only under the 16-bit float controls; F16Basis goes (f16_arithmetic answers a bool), and so do ArithPlan::f16_arith and the FastMathRewrites note of the measured form left to the device's compiler. - NaN moves: a widening's, a negation's and a magnitude's NaN is the device's, noted (moved_nan, moves_nan, nan::moves_answered, FloatFacts::nan_moves and ArithPlan's nan_moves and held_nan_moves go). A half texel's write to a 32-bit float format notes DeviceNanEncoding on every device (texture::half_write_nans' Wide class goes; HeapNanFamilies' NAN_WIDE family now holds no deviation). - Half conversion: every half the module rounds through the device's conversion is noted NativeHalfConversion; texture::half_texels (a sample of a 32-bit float texel) and half_texel_nans (a 32-bit float or packed small float class) lose their MetalHalfConversion exceptions, so both note those classes on every profile. Gone with it, the analyses only the measured facts read: narrow::round_measured (round serves) with the measured roundings the builder and the IR carried, narrow::rounds_unmeasured, narrow::moves_unfolded with the merges module, and the stored texels the texture writes recorded for it. compile.rs's half-rounding block keeps converts, widens, the controlled and fused roundings and their three notes; the MetalNanMoves, MetalHalfConversion, MetalPackConversions and MetalHalfArithmetic requirements go. Notes: the precision-note catalogue loses no entry. Every note the deleted forms withheld is still raised, now on every device (NativeNanEncoding, DeviceDenormals, NativeMinMax, DevicePackConversion, NativeHalfConversion, HalfTexelConversion, DeviceNanEncoding, NativeDot, NativeMix); their docs and docs/HOWTO.md lose the measured exceptions, and the docs of a device whose functions are Metal's own go from math.rs, arith and artifact.rs. Validation: c3/bound.rs asks the product's notes of an operation (AirOp::product_notes), part of how C3 decides a near-equivalent; it passed an EntryMath the product read only for the unreachable form, so it drops the argument and its answers are unchanged. fast_trig_within_apples_bound's doc loses the MoltenVK clause. Tests: each deleted form's tests go with it (the_maths_functions_are_the_device_s, the member format version 486 round trip, a_measured_half_sum_requires_the_arithmetic_fact_alone, a_merge_of_a_select_is_followed_through_struct_members, the device_answers asserts), with the hand-set profile fields only they used (FloatFacts' nans, device_denormals, unary_denormals, native_min_max, nan_moves). The rest assert the note on every profile: engine_arith, engine_float_call_notes (its note class is the fma route alone), engine_native_half, engine_metal_denormals, engine_tiny_products, engine_rate_map, engine_opencl_mode, engine_texture, engine_extended_range's heap test, from_queries, arith's and narrow's tests. SEMANTICS_VERSION 2238, ARTIFACT_FORMAT_VERSION 576 (placeholders; main renumbers). SEMANTICS: the notes and keys of the same input change form. ARTIFACT: the codec loses ten DriverDeviation and eight VkProperty tags and EntryMath. RUNTIME_VERSION stays: the pinned sources' edits (device/profile.rs, device/derive.rs, device/requirements.rs, lower/arith/pack.rs and a doc in bind/heap.rs) remove forms no profile reached, so no run changes; runtime-sources.sha256 takes the new hash. api_signatures is blessed; docs/REFUSALS.md and the coverage are unchanged. Consumer check (consumer-uses.sh, consumer development c8407fb6fc, 58 refs): EntryMath, of_float_operator, of_math_call, MetalCanonicalNans, MetalFloatDenormals, MetalFloatFunctions, MetalHalfArithmetic, MetalHalfFma, MetalMinMax, MetalNanMoves, MetalPackConversions, MetalUnaryDenormals, FloatFunctions and NanEncoding 0 hits (code). MetalHalfConversion: 0 on development; used in crates/reims-vgpu-vulkan/src/gpu/rgbx.rs on three of the consumer's steelbrain/* branches (gaugetick, recnil-r4, refdump), a crate its development no longer has. Verified: m3-max-61298 at this tree (WIP arith 10, msi-laptop): fmt, clippy (all features, --cfg m2v_gpu and --cfg m2v_cpu_icd) and Rustdoc rc 0 (61293, on the tree before, failed clippy on three unused imports, which this tree removes); nextest over metal2vulkan, metal2vulkan-conformance, metal2vulkan-validation and metal2vulkan-runtime, 5876 run, 5874 passed, 25 skipped, 2 failed: the render key test (the_old_render_descriptor_key_keeps_its_value), left unpinned until the next named pin, and golden_hashes_match_the_table, whose 29536 stale cells are all under a changed profile fingerprint (0 new, 0 gone, 0 under a changed fixture source): the profile lost two fields, so every key changed and the table is re-blessed on development. Rebased onto development |
||
|
|
5db3215260 |
Rotated blends: every blend not exact by construction announces its rounding
The planner's ruling on the rotated blend: the note no longer follows a measured table. A blend on an attachment held with its channels rotated (ARGB8Unorm) raises PrecisionNote::RotatedBlendRounding unless it is exact by construction: a minimum or a maximum, which takes no factor, or a blend whose chosen Vulkan factors are all ZERO or ONE, whose result is the source, the destination, zero, or their sum or difference, a whole code half a code from any tie. rotated_blend's MEASURED table and measured() go; unmeasured() becomes inexact(), which reads the state rotated_blend() chooses: a Synthesized state (SRC1 factors) is inexact, and a Direct one is inexact unless its four factors are ZERO or ONE. Newly announced, the nine states of the old table that are not exact by construction, each Metal's color pair and alpha pair under the one operation: - DestinationColor over Zero, DestinationAlpha over Zero, Add; - SourceColor over OneMinusSourceColor, SourceAlpha over OneMinusSourceAlpha, Add; - BlendAlpha over OneMinusBlendAlpha for both, Add; - the two straight-alpha pairs: SourceAlpha over OneMinusSourceAlpha with the alpha the same, and with the alpha One over OneMinusSourceAlpha, Add; - One over OneMinusSourceAlpha for both, Add and Subtract; - SourceAlpha over One with the alpha Zero over One, Add; - SourceAlpha over One for both, ReverseSubtract. One over Zero and One over One (Add) stay unannounced, now as exact by construction. Newly unannounced: blends outside the old table whose Vulkan factors are all ZERO or ONE, which Metal gives with one Zero or One factor for both its color and alpha sources and one for both its destinations, under Add, Subtract or ReverseSubtract (One over One under ReverseSubtract, Zero over One, and the like). Minimum and maximum stay unannounced. StageIo::rotated_blends and LoweringInputs::rotated_blends stay: they are now the attachments whose blend is not exact by construction. The stage raises the note from the latter, and color_writes::check reads the former to refuse a fragment compiled for another set than the pipeline's (NeedsInput(ColorWrites)), so the set still has a reader; its docs lose "measured". The docs/API.md catalogue entry, PrecisionNote::RotatedBlendRounding's doc, LoweringInputs' and StageIo's docs, rotated_blend's module doc, and validation's c3 deferral doc, its bound string and comparison.rs's allowance doc state the one rule. The validation files use the note to defer a row in C3 (c3.rs) and give it an unbounded allowance (comparison.rs); both follow the note, so more rows on rotated attachments are deferred, by the note alone. Tests: rotated_blend's measured-forms test becomes the_lane_s_blends_store_metal_s_rotated, over the old table kept as test data (LANE): every state stores Metal's blend rotated alike on MoltenVK and lavapipe, and all but one over zero and one over one are inexact. inexact_blends_are_announced adds a difference by ones and a held destination, exact. engine_rotated_colors expects the note on its product and its two second-output blends, and not on its minimum or its reverse subtraction of ones. SEMANTICS_VERSION 2237 (placeholder; main renumbers): the rotated blends' set, which the key carries, and the stage's notes change for the same descriptor. ARTIFACT_FORMAT_VERSION and RUNTIME_VERSION stay. api_signatures, docs/REFUSALS.md and the coverage are unchanged. Consumer check: unmeasured and MEASURED were pub(crate); no public name changes. Verified: m3-max-61259 at this tree (a5396ea291 before the colour commit's message was filled, msi-laptop): fmt, clippy (all features, --cfg m2v_gpu and --cfg m2v_cpu_icd) and Rustdoc rc 0; nextest over metal2vulkan and metal2vulkan-validation, 4719 run, 4718 passed, 23 skipped, 1 failed: the render key test (the_old_render_descriptor_key_keeps_its_value), left unpinned until the next named pin. Rebased onto development |
||
|
|
4d17e4593b |
Colour writes: the Metal colour-write deviations and the premultiplied rotated blend go
DriverDeviation::MetalColorWrites, MetalFloatColorNans, MetalSmallFloatColorWrites and MetalNorm16ColorWrites, with their VkProperty values, were never taken. Device::from_queries enables no Metal* property, and no committed profile carries one. Their forms go: - lower/stage_io/color_write.rs: the Metal conversion (Conversion, conversion()), the skip of a half-float channel on a Metal device, and nan_kept's profile read; - pipeline/color_writes.rs: lowered()'s small-float and 16-bit norm arms, metal_color_writes and metal_stored; - the rotated blend's premultiplied form, which only MetalColorWrites reached: rotated_blend::premultiplied, the measured table's premultiplied factors, RotatedBlendForm::Premultiplied, PlannedOutput::premultiplied and stage_io's premultiplied_blue. RotatedBlendForm kept one variant, Unmeasured, so it goes too. LoweringInputs::rotated_blends and StageIo::rotated_blends become a BTreeSet<u32>: the rotated attachments blended in none of the measured forms. rotated_blend::rotated_form becomes unmeasured(). Notes: RotatedBlendRounding stays, since the unmeasured form raises it; its doc and its docs/API.md catalogue entry lose the premultiplied clause. DeviceColorConversion and DeviceNanEncoding stay, since the device's forms raise them. On Apple's own blend the two straight-alpha pairs may round one code apart in the search's form, unannounced; rotated_blend's module doc says so. Tests: color_writes' tests lose their Metal branches; api_surface's with_color_writes loses its device argument; engine_rotated_colors loses the Apple-blend expectations and premultiplies(); rotated_blend's tests read unmeasured(); engine_fragment's profile filter and api_tests follow. SEMANTICS_VERSION 2236, ARTIFACT_FORMAT_VERSION 575 (placeholders; main renumbers). SEMANTICS: the rotated blends' key bytes change form. ARTIFACT: the codec loses RotatedBlendForm and four VkProperty values, and StageIo's field changes type. RUNTIME_VERSION stays; no binder source changes. api_signatures is blessed; docs/REFUSALS.md is regenerated (DualSourceBlending loses rotated_blend's premultiplied site). Consumer check (consumer-uses.sh, consumer development 415d453172, 58 refs): MetalFloatColorNans, MetalSmallFloatColorWrites, MetalNorm16ColorWrites, RotatedBlendForm and rotated_blends 0 hits (code). MetalColorWrites: 0 on development; used in crates/reims-vgpu-vulkan/src/gpu/encode_render.rs (ties_as_metals) on 36 of the consumer's steelbrain/* branches, a crate its development no longer has. Premultiplied and Unmeasured: the consumer's hits are its own (a comment in display.rs, its RefusedWait::Unmeasured), not these items. Verified: m3-max-61229 at this commit (homelab-um790-xtx-1): fmt, clippy (all features, --cfg m2v_gpu and --cfg m2v_cpu_icd) and Rustdoc rc 0. m3-max-61208 on the same change before its rebase onto |
||
|
|
b0e351ffbc |
Validation: multisampled passes and textures run through the runtime
Family H of the executor's move onto metal2vulkan-runtime: a render case of more samples (raster_sample_count), and any case binding a multisampled texture, now runs on the runtime's public API, filled and read back as executor_contract::multisample states for both executors. Metal uploads and copies no multisampled texture, and neither does the runtime. So runtime_multisample fills each slice with one draw of the owned sample_fill fixture (fixtures/public/engine/sample_fill.metal, compiled by scripts/regen-air-fixtures), whose fragment runs once per sample (sample_id) and writes that sample's texel from a buffer: a color texel through an unsigned-integer view of its texel size (the texture made with PixelFormatView usage), so its bits cross unconverted, a Depth32Float one as depth(any) under an always-passing depth test that writes (a depth outside [0, 1] refused as depth_outside_unit_range, as runtime_depth refuses it). A multisampled stencil aspect holds one value in every sample (uniform_stencil), which the case's pass clears it to. After the draw a dispatch of the fixture's sample_read kernels reads every sample, one threadgroup each, as whole words in the attachment layout (unpack_words), unresolved, as the oracle's sample_readback does. runtime_textures makes a multisampled texture Private (Metal keeps none Shared), for rendering and, if color, for views of another format, and fills it by those draws. runtime_render makes each attachment of a multisampled pass a Private Type2DMultisample texture of the pass's samples, with a texture index for its read's view, and reads every sample back for the comparison. engine::runtime_texture no longer keeps a multisampled texture off the runtime, and runs_render_through_runtime takes any sample count. An attachment of both aspects still carries separate_depth_stencil. What moves: of the committed cases, 49 multisampled passes (all public; 2 with both aspects keep the requirement) and 8 cases with a multisampled input texture (7 public kernel cases, 1 private fragment case). ENGINE_EXECUTOR_ABI to vulkan-engine-v197. The new owned fixture adds rows to the golden tables, re-blessed on development. Tests: engine/tests.rs routes a multisampled pass, multisampled depth and stencil attachments and a kernel's multisampled texture through the runtime; engine_render.rs's each_sample_of_a_multisampled_target_holds_its_own_invocation draws sample_rate_mask_in into 4 samples and checks each sample's index, on Linux through the runtime too, bytes equal to the executor's own; engine_textures.rs's depth_and_multisampled_textures_read_their_authored_texels runs through the runtime on Linux. Built and run in the lane's compile job (ids sent with the sha); not yet built when committed. |
||
|
|
6593e998d1 |
Validation: tessellation cases draw their patches through the runtime
Family I of the executor's move onto metal2vulkan-runtime. A post-tessellation vertex case's patch draw, which the Metal oracle encodes as setTessellationFactorBuffer: at executor_contract:: tessellation's offset and instance stride and drawPatches: with no patch index buffer, now draws through the runtime's public API the same way: the factors a Shared buffer bound by set_tessellation_factor_buffer at FACTOR_OFFSET and FACTOR_INSTANCE_STRIDE, then draw_patches with the case's control points, patch start, patch count, instance count and base instance and no index buffer. engine::runs_render_through_runtime takes an Assembly::Patches case whose draw is DrawCall::Patches with neither a patch index buffer nor a control-point index buffer (the runtime's patch index buffer is Gap::Draw of PatchIndexBuffer); the authored TessellationDraw spells neither, so every committed tessellation case meets the structure. runtime_render's drawn() encodes the patch draw; a patch draw that reached it with an index buffer fails the run, never draws other patches. What moves: the 25 committed tessellation cases (23 public, 2 private), one of them with attribute-buffer out-of-bounds targets of control-point form, whose facts runtime_bounds::drawn reads as before. ENGINE_EXECUTOR_ABI to vulkan-engine-v196: these rows' executor changes. Tests: engine/tests.rs a_plain_draw_and_only_one_runs_through_the_runtime routes a patch draw without an index buffer and keeps one through a patch index buffer, and a patch draw of a primitive assembly, on the executor's own context; engine_render.rs's a_back_culled_patch_and_its_mirror_leave_exactly_one_drawn draws each of its patch draws through the runtime on Linux and compares the executor's own bytes. Built and run in the lane's compile job (ids sent with the sha); not yet built when committed. |
||
|
|
bcc417bc08 |
Translator: SparseResidency's text names a footprint of the border alone
PrecisionNote::SparseResidency said the device's OpImageSparse* residency may count a texel of zero weight Metal does not. Public case fd292944c2 (a 256x128 r32_float sparse texture with x 128-255 mapped) found a second way the device's word differs: lavapipe answers not resident for a clamp_to_border access whose footprint is the border alone (nearest at u -0.5 and 1.5, linear at u -0.5, -1/256 and -1/512, gather at u -0.5 and 1.5), where Metal answers resident, beside a mapped edge too. Every value word was equal; 7 of 200 residency words differ (valexec2's proof m3-max-61595, decoded against the committed Metal rows). Vulkan states only "whether any texels accessed by the instruction are sparse unbound texels" (vkspec 20.2.6), so the word is the device's, which the note's first clause already says; its text now names this case beside the zero-weight texel, in the doc comment and in docs/API.md's catalogue. Doc only: no emission, key or version change. |
||
|
|
a529fb658e |
rt: the floor's depthBiasClamp has its missing-feature case, and the runtime-floor profile states it
The floor requires depthBiasClamp (the first commit of this change). The runtime's each_missing_feature_is_named gains its case, as its count of cases is held to REQUIRED's. The regeneration's RUNTIME_FLOOR and runtime-floor.json's m2v_runtime_floor block state it, in the generator's order (the block the runtime's the_floor_profile_states_exactly_the_floor holds equal to floor.rs; check_device_profiles: 0 findings over 17 profiles; the JSON line is written as the regeneration writes it, without refetching its pinned sources). CONFORMANCE-COVERAGE is regenerated for the ledger row render-state-depth-bias left (7688 rows to 7687). The runtime-floor contexts' opened chains move with the profile; their bless is the next commit. Verified: suite m3-max-61635 at 406f39dc90 (msi; the workspace suite and the lavapipe device tests) failed exactly these three, each_missing_feature_is_named (52 cases against 53), the_floor_profile_states_exactly_the_floor (depthBiasClamp) and the coverage document; the rerun follows. |
||
|
|
6ef64ae3ee |
rt: a depth bias's clamp is the device's own
setDepthBias:slopeScale:clamp: bounds the bias by its clamp: "Pass a positive or negative value to limit the largest magnitude of a positive or negative bias, respectively. You can disable the bias clamping functionality by passing 0.0" (Apple's page for the method, as fetched). Vulkan's depthBiasClamp is the same bound (dbclamp: x for 0, min(x, clamp) above 0, max(x, clamp) below). rt refused every clamp but 0 (DrawKind::DepthBiasClamp), where the deleted runtime passed it. floor: depthBiasClamp joins REQUIRED. Every dumped venue reports it (vulkaninfo m3-max-48727 to 48731, 48736, 48737 and 61508 for the RX 550: RX 7900 XTX, the three 780Ms, RTX 2080, RTX 3090, Iris Xe, RTX 5080 Laptop, llvmpipe, the UHD 630's Windows driver, KosmicKrisp on the M3 Max, RX 550), and Vulkan 1.4 and Roadmap 2022 require it. render encoder: set_depth_bias keeps the clamp beside the bias and slope scale and records it in vkCmdSetDepthBias, as dynamic state (no pipeline). It returns nothing now, as Metal's call does: its only error was the clamp. DrawKind::DepthBiasClamp is deleted. The consumer's checkout names both: rt_platform/render.rs:380 (`e.set_depth_bias(...)?`) and rt_platform/unbuilt.rs:873 (a test's sample refusal of DepthBiasClamp); each needs a one-line change at its next pin. AGENTS.md: the Scope sentence on features no guest has used is replaced with the planner's wording: a feature a program can ask about is answered from the Vulkan query; one Metal gives every Mac device with no way to ask is built, a typed refusal in the known gaps until it is. Docs: the README's floor table, its depth bias paragraph and its render encoder known gaps; docs/REFUSALS.md regenerated (Draw's basis and sites); api_signatures.tsv blessed (the setter's signature, the variant gone). The conformance ledger drops render-state-depth-bias's refusal row. Tests: every_device_tests_writes_and_biases_a_depth_attachment's first draw is biased by 2^23 (0.25 or 0.125 in the device's unit at depth 0.25) clamped to 0.0625, and the depth read back is 0.3125 on every device; the later draws' answers are unchanged in kind. The conformance case render-state-depth-bias (a slope-scaled bias under the clamp -0.0125) now compares against Metal's recording. |
||
|
|
6af76cf309 |
Validation: separate depth and stencil attachments are the runtime's limit
A fragment case whose depth/stencil attachment holds both aspects is
drawn by the Metal oracle into Metal's separate Depth32Float and
Stencil8 textures, attached to one pass: plain Metal on every Mac. The
runtime does not build that form yet. It renders into no separate depth
and stencil textures in one pass (Gap::RenderPass of DepthStencilViews,
and its pipeline state Gap::RenderPipeline of DepthStencilFormats), both
among the known gaps its README states. The planner's ruling: record
these rows as the runtime's limit with that typed gap, by the
function-table mechanism; the doc comment states the gap as unbuilt in
the runtime, not as Metal's.
ToolingRequirement::SeparateDepthStencil ("separate_depth_stencil"):
Limit::Runtime, it stops the engine's candidate and keeps its cases
Metal-qualified (qualifies_on_metal). The case checker raises it from
the case's literals (executor_contract::case_requirements: a vertex or
fragment case's depth/stencil attachment with both initial aspects),
never from a source's structure, so no census row carries it.
executor_contract.rs is a classifier input, so every cached triage
recomputes. If the runtime builds the form, the requirement goes in the
same commit.
What lost execution: of the committed cases, 5 fragment cases hold
both aspects: the 3 of family G (one sample, observing stencil) and 2
multisampled ones (family H), all of which ran on the old executor
until now.
Tests: requirement.rs's
a_separate_depth_stencil_attachment_stops_only_the_candidate and both
requirement lists; executor_contract's case test (a fragment case's
attachment of one aspect raises nothing, of both raises it alone).
Verified: cargo fmt; the compile gate follows as a potluck job.
|
||
|
|
cca476549f |
Validation: a draw's depth/stencil attachment of one aspect runs through the runtime
Family G. A render case with a depth/stencil attachment stayed on the executor's own context. A vertex or fragment case whose attachment has one sample and one aspect now draws through the runtime (engine::runs_render_through_runtime), observing a buffer, a texture, a color target, the attachment's aspect or nothing; a fragment case with the attachment and no color target renders, as the attachment is the pass's. The attachment is made as the oracle makes it (Metal's separate Depth32Float and Stencil8, Shared, of RenderTarget usage): - a Depth32Float is filled by a draw of its depths (runtime_depth), as a 32-bit float depth texture is, since the runtime takes no upload of one (Gap::FloatDepthUpload); a depth outside [0, 1] stays DepthOutsideUnitRange; - a Stencil8 is written from its bytes with replace_region. The pass loads and stores it; the draw's depth-stencil state, stencil references and pipeline depth and stencil formats were already the oracle's. The final aspect is read back with get_bytes into the run's RenderFinals, from which the depth or stencil output is selected. An attachment of both aspects is the oracle's two textures, which the runtime renders into in no one pass (Gap::RenderPass of DepthStencilViews; its pipeline Gap::RenderPipeline of DepthStencilFormats): such a case, and one of more samples (family H), stays on the executor's own context. Rows: of the committed cases, 21 fragment cases are family G's (one sample, the rest of E/F's structure): 16 stencil-only observing stencil, 2 depth-only (one observing depth, one, private, a color target), and 3 of both aspects observing stencil, which stay where they were. Expected: the 18 one-aspect cases run through the runtime; the family G proof reads them. ENGINE_EXECUTOR_ABI to vulkan-engine-v195. Tests: a_plain_draw_and_only_one_runs_through_the_runtime (a depth or a stencil attachment, observed or not, routes; one of both aspects or of 4 samples does not); the device test a_fragment_case_writes_its_depth_and_stencil_attachment draws each aspect alone through the runtime on Linux (depth 0.5 over 1.0, stencil 7 over 0xab). Verified: cargo fmt; the compile gate and the family G proof follow as potluck jobs. |
||
|
|
9a28de4736 |
Validation: an indexed draw past its index buffer is the runtime's limit
The runtime refuses an indexed draw whose indices leave its index buffer
as Refusal::IndexBufferOffset, as Metal's validation stops the draw
(render_encoder's draw path checks offset + count * size against the
buffer's length; the runtime's README states the refusal among those
Metal's validation makes). A case that declares a draw's index buffer an
out-of-bounds target is such a draw, so no run through the runtime draws
it. The planner's ruling: record these rows as the runtime's limit with
that typed refusal, by the function-table precedent.
ToolingRequirement::IndexBufferPastEnd ("index_buffer_past_end"):
Limit::Runtime, it stops the engine's candidate and keeps its cases
Metal-qualified (qualifies_on_metal). The case checker raises it from the
case's literals (executor_contract::case_requirements: an out-of-bounds
target of OutOfBoundsResource::IndexBuffer), never from a source's
structure, so no census row carries it. executor_contract.rs is a
classifier input, so every cached triage recomputes.
What lost execution: of the committed cases, the 2 public index-buffer
cases d900a10225 and da4185d2a2, which ran on the old executor's padded
copy until now. The old executor's padded index copy is now reached by
no committed case; it goes with the old executor's tables.
Tests: requirement.rs's an_index_buffer_past_its_end_stops_only_the_candidate
and both requirement lists; executor_contract's case test (a vertex
case's index-buffer target raises it alone, an attribute-buffer target
raises nothing).
Verified: cargo fmt; the compile gate follows as a potluck job.
|
||
|
|
4e465d811a |
Validation: a draw's attribute-buffer out-of-bounds target runs through the runtime
A render case with an out-of-bounds target stayed on the executor's own
context. A vertex or fragment case whose every out-of-bounds target is
an attribute buffer now draws through the runtime
(engine::runs_render_through_runtime), and its facts are read before the
state is made (runtime_bounds::drawn): the translator's compile of the
state's descriptor on the runtime device's own translator
(Device::compile_render_pipeline, whose stage inputs are the ones the
runtime lowers each stage under, render_pipeline_key of the variant key
its state takes), read by engine::draw_out_of_bounds_run, which now takes
the translator Device for its policy.
The runtime's floor enables no buffer robustness: its README states that
a vertex fetch outside its buffer returns what the device gives. So
fixed-function vertex input on a profile without buffer robustness is
contained as vertex-input:unchecked (Check::Unchecked; it was an Err,
"which contains nothing"), and the case is refused before the make as
not_supported{uncontained:unchecked vertex_input}. A contained target of
such a draw would need guards around its vertex buffers, which the draw
does not place, so it is refused as executor_not_implemented; no routed
case reaches that.
Rows: of the 4 render out-of-bounds cases, 01b45f7c10 (a vertex
attribute fetched past its vertex buffer) is expected to move from the
old executor to not_supported{uncontained:unchecked vertex_input}. The 2
index-buffer cases (d900a10225, da4185d2a2) stay on the executor's own
context: the runtime refuses indices past the buffer
(Refusal::IndexBufferOffset), as Metal's validation does, which the
facts do not state yet. The control-point case a95f41be73 is a
tessellation draw, which stays there too. On the old executor, the
robustness-off leg's fixed-function attribute target is now the same
refusal instead of a failure.
ENGINE_EXECUTOR_ABI to vulkan-engine-v194.
Tests: a_draws_targets_are_contained_by_their_fetch (every committed
profile contains the fixed-function attribute, unchecked exactly where it
checks buffers in the shader, which a committed profile does);
a_plain_draw_and_only_one_runs_through_the_runtime (an attribute target
routes, an index-buffer target does not).
Verified: cargo fmt; the compile gate and the family D proof follow as
potluck jobs.
|
||
|
|
00e254ac29 |
validation: an out-of-bounds target is contained as its module's domains decide
containment read a module's facts as if every device took the resident
table and the handle table. The runtime's device takes the identity
domains (DevicePolicy), so a kernel case through the runtime whose target
is a buffer an argument buffer points to, or an argument buffer's texture
array, failed: the module has no resident roots and no handle table.
ModuleFacts now carries the policy of the device the module was compiled
for (Device::policy: the runtime's translator, the executor's own device,
and DevicePolicy::default() for the committed tier profiles, which are
made with it).
- Under the identity pointer domain a pointer loaded from memory is the
address it holds, used as given: the runtime's README states that an
access through a pointer loaded from memory is not checked. Such a
target is contained as device-address with the new Check::Unchecked,
and out_of_bounds_run refuses every case with an unchecked target
before the make, as NotSupported::Uncontained with the new `unchecked`
forms (serde default):
not_supported{uncontained:unchecked loaded_pointer}.
- Under the identity handle domain an argument buffer's texture-array
index is the resource id's index masked onto the descriptor arrays
(the new Medium::ResourceId, resource-id:shader), whose elements no
live texture owns are null descriptors: its read rule is
ResidentTexels, as the handle table's.
ENGINE_EXECUTOR_ABI to vulkan-engine-v193.
Rows: the family D proof at
|
||
|
|
34c8f0e67c |
Validation: a kernel out-of-bounds case runs through the runtime, its facts every lowered variant's
A kernel case with out-of-bounds targets now routes through the runtime like any other kernel
case of its structure (engine::runs_through_runtime no longer excludes one). Before the state is
made, platform::runtime_bounds lowers each KernelVariant of the case's kernel on the runtime
device's own translator (rt::Device::translator), under LoweringInputs::kernel_variant of the
inputs kernel_inputs_read gives the descriptor's: the inputs the state lowers each of its modules
under, which the runtime's own test pins. A variant the translator refuses is one no dispatch runs.
Each lowered module's facts (its slots, fetches, resident roots, handle table and strategy
census) give the run's out-of-bounds facts through engine::out_of_bounds_run, as the executor's
own context reads its module's. Where two variants give different facts, which module a dispatch
runs would decide the case, so it is refused before anything is made:
NotSupported::Uncontained now carries the variant that differs (None for the device's robust
forms, as before), "not_supported{uncontained:variant PartialThreadgroups}".
Each guarded target (a buffer, or an argument buffer's) is a buffer at the runtime's placement
alignment inside a Shared block of its own, between guards of its declared reach (at least
MIN_GUARD), every guard byte GUARD_FILL, read back through a buffer over the whole block after
the dispatch: GuardCount::escaped, and past_end 0 (the buffer is all its bound memory). The
row's census records the facts with the counts.
Texture-buffer cases stay on the executor's own context (the runtime makes no texture buffer),
and so do the render out-of-bounds cases (vertex fetches); stage inputs do not route.
Tests: the routing test asserts an out-of-bounds kernel case routes; the device test
a_device_buffer_accessed_past_its_end_is_contained_through_the_runtime runs the public
ob1_storage_buffer case through the runtime (loads past the source read zero, stores past the
output do nothing, no guard byte changes, each target DeviceAddress / Shader). ENGINE_EXECUTOR_ABI
vulkan-engine-v192. docs/VALIDATION.md says how the facts are read.
Verified: cargo fmt; the compile gate and lavapipe suites, then the family's proof, follow as
potluck jobs.
|
||
|
|
47f804e943 |
Translator: a kernel variant's lowering inputs come from LoweringInputs::kernel_variant; rt answers its translator
rt's kernel state lowered its partial-threadgroups and emulated-SIMD-group variants under inputs it assembled by hand: a clone of the plain module's inputs with one flag set. Validation's executor is to lower the same variants on the same device to read each module's containment of an out-of-bounds target, so the assembly moves into the translator as the one constructor both call: KernelVariant (Plain, PartialThreadgroups, EmulatedSimdgroups; ALL) and LoweringInputs::kernel_variant, applied to the inputs kernel_inputs_read gives. rt's Compiled::of and its translate tests' helpers call it. metal2vulkan-runtime's Device::translator returns the translator device creation built, the one every state lowers on. It retains nothing new (it borrows Core::translator) and has no Metal counterpart. One rt device test pins the agreement: for icb_replay_grid_template (its plain module checks the store at a computed index, SlotBounds of buffer 1, and leaves the two constant-offset loads of buffer 0 unchecked) and gsm2_simd_products' simd_float_products, every lowering a first device kept in its cache directory is found under the key of one variant's public inputs, byte-equal to Device::translator's compile_function of that variant, and at least as many are found as the states made modules. Surface: api_surface names KernelVariant (N); api_signatures blessed (8 records added, none changed or removed); docs/API.md and the runtime README's compute-state section say how a consumer lowers a variant. No public item is removed, so no consumer search applies. Verified: cargo fmt; the compile gate and the runtime's device tests on lavapipe follow as a potluck job. |
||
|
|
0dc56519c9 |
translator: the identity domains push a render pass's length to a vertex function that writes its slice
Under the identity domains a vertex function that writes [[render_target_array_index]] was refused as IdentityDomains (an encoder value the function reads as RenderTargetArrayLength): the field was not among the encoder values those domains push. The runtime now fills it (the pass's length, at least 1, rt's FieldValue::RenderTargetArrayLength), so the field joins the admitted pushed values, beside AlphaTestReference and FetchedColor; nothing else of the form changes. Found by the runtime's layered device test, which refused rt6_layered on every GPU leg at 912548d4db (m3-max-61476, 61477, 61478, 61480, 61481, 61486, 61490) and on lavapipe (61482). SEMANTICS_VERSION 2235, one above development's 2234 (placeholder): such a vertex function now compiles where it was refused. lower/select.rs and cache/mod.rs are not among validation's runtime inputs, so runtime-sources.sha256 and RUNTIME_VERSION stay. A test pins the form on lavapipe's profile (engine_identity_render), and docs/API.md names the pushed length. |
||
|
|
4e3a6a3555 |
rt: layered rendering in one form, the vertex function storing Layer in every pass
`RenderPassDescriptor::render_target_array_length` is Metal's `renderTargetArrayLength`. A pass
of length N of 2 or more is one rendering of `layerCount` N: every attachment and resolve texture
is a view of its level and N slices from its own `slice` (a 2D array view; a cube's faces are its
slices), and the rendering's load, store and resolve cover every layer, with no per-layer loop.
At 0 and 1 the pass renders the attachment's slice alone, as Metal's does.
A vertex function's `[[render_target_array_index]]` has one form: the variant that writes
`Layer`, in every pass. Each draw pushes the pass's length, max(len, 1)
(`FieldValue::RenderTargetArrayLength` for the translator's `PushField::RenderTargetArrayLength`),
and the function stores 0 for an index at or past it, so at 0 and 1 every index renders the
attachment's slice. The fragment function reads the raw index through the flat varying the
translator carries. The runtime never asks for `VariantKey::dropped_vertex_layer`; a state whose
fact is `RenderTargetArrayLength { layer_dropped: true }` is refused as a draw input. What still
uses `dropped_vertex_layer`: the old binder (`bind/graphics.rs:905`, the variant it asks for at a
shape's length), stage_io's plan (`lower/stage_io/plan.rs:1600` and `:2305`, also the
non-layered amplification), and the validation crate's engine tests
(`candidate/engine/graphics/tests.rs:907`); it stays for cutxlate to delete.
`shaderOutputLayer` joins the floor's required features: every probed device reports it
(vulkaninfo, jobs m3-max-61359 on gem10: the 780M, the RX 550 and lavapipe; 61360 on um790: the
RX 7900 XTX, the RTX 2080, the 780M and lavapipe; 61361 on um870: the 780M, the RTX 3090 and
lavapipe; 61362: KosmicKrisp, Mesa 26.3.1; 61366: the UHD 630's Windows driver, Vulkan
1.3.215). A device without it gets the floor's refusal. The runtime-floor profile and its
generator gain it.
Refused, in the README's layered-rendering gap line: an attachment or resolve texture with fewer
slices from its own than the pass's length (`Refusal::AttachmentPlace`, naming the last slice); a
3D texture's depth planes (`TextureType`, as for every 3D attachment); a length past
`maxFramebufferLayers` (`RenderPassKind::ArrayLength`, new:
VUID-VkRenderingInfo-layerCount-07817); a draw that reads one of a layered pass's attachments
through a texture on a device without the feedback loop (`AttachmentRead`: a shadow holds one
layer); and a vertex function whose index the translator cannot show the same at every vertex of
a primitive, at creation, naming `LayeredRendering` and `geometryShader`: Vulkan requires one
`Layer` per primitive (VUID-VkPipelineShaderStageCreateInfo-stage-02596), the translator's other
form is a geometry stage device creation does not enable, and Metal calls a differing index
undefined. The feedback-loop move's ranges around the rendered layers (`around`) take the
attachment's layer count.
The conformance runtime side passes the length; the case `layered-render-target-array-length`
loses its ledger row. REFUSALS, METAL-COVERAGE and CONFORMANCE-COVERAGE regenerated; the API
table gains the field and the kind.
Test: `tests::layered`, on every device of the cfg's kind: a 2D array's slices 1 to 3 with an
index past the length, a cube's six faces, a pass of length 0 and one of length 1 whose vertex
function writes index 3 (rendering the attachment's slice, the fragment reading 3), every slice
read back; and `rt6_first_vertex`'s per-vertex index refused naming `LayeredRendering`.
|
||
|
|
841c6872ac |
Identity domains: a read through a sampler takes its border texels from the resource ID's word
MSL 4.1's read(sampler, coord[, offset][, lod]) of a texture slot, through a constexpr sampler
with a clamp_to_zero or clamp_to_border axis or through a runtime [[sampler(n)]], reads Metal's
border texel at an index outside the level. The default domains take the border texels from the
slot's BorderTexels specialization (RuntimeFact::BorderTexels); under the identity domains that was
state of the bound texture they did not source, so such a kernel was
Unsupported{IdentityDomains}. The border texels are bits 0-11 of the texture word
(TextureWord::BORDER_TEXELS, docs/RESOURCE-ID.md), already in the slot's pushed resource ID
(PushField::SlotGuestBase). Under the identity domains select_through now sets neither the slot's
border_texels nor the fact, and border_bits reads the word through emit::identity_id and masks
it, as the format's missing alpha is read. SlotPlan::identity_lowered and identity_unsourced drop
the border texels, which the identity domains now source. An argument buffer's texture read so
(its handle-table entry's border texels) is still refused. The default domains are unchanged.
Conformance (known-gaps-rt.tsv, runtime on lavapipe against the committed Metal answers): six
read-through rows translate and match, so their rows go: read-through-int exact;
read-through-half, -layers, -line, -read-write and -volume differ only by notices the suite
declares. read-through-volume reads through a runtime sampler of an opaque-black border, whose
sampler state the runtime notes on every device: the case now declares that notice
(replay::swizzled_border_notice) wherever it reads through such a sampler, as border_swizzles
does. The four plane rows (a8, r32f, rgba8, rgba8-swizzled) now make every pipeline up to
rt_heap_zero, an argument buffer's texture read through a border sampler, where they are still
refused; their rows move there.
Docs: RESOURCE-ID.md says a slot's read through a sampler takes its border texel from bits 0-11
of the word; API.md's identity forms name the read through a sampler (the paragraph's lines
reflowed); CONFORMANCE-COVERAGE.md re-derived for the six rows gone (REFUSALS.md re-derives
unchanged).
Test: engine_identity's a_read_through_a_sampler_takes_its_border_texels_from_the_word:
engine/kernel_read_through's rt_arg (a runtime sampler, offset (1, -1)) under the identity domains
on lavapipe, moltenvk-m3 and moltenvk-m3 without robustImageAccess2: L3, no specialization
constant but the dispatch's, no BorderTexels fact, and on the CPU interpreter, through a sampler
that clamps every axis to the border, each of R32Float, RGBA8Unorm, A8Unorm and RGBA8Unorm
swizzled (a, b, 0, r), under each border color, reads metal::sampler::border_texel's texel past
the right, left and top edges and the texel inside.
SEMANTICS_VERSION 2234, one above the previous commit's (main renumbers at landing): a refusal
becomes a module. The old runtime's render descriptor key changes with it, pinned at landing.
Verified (potluck; the jobs ran this diff on the previous commit's diff on development
|
||
|
|
2dd8ffce0d |
Identity domains: a texture atomic's slot is the R32 storage element its resource ID names
A texture atomic (atomic_fetch_*, atomic_exchange, atomic_compare_exchange_weak, atomic_load or
atomic_store on a texture1d, 1d_array, 2d, 2d_array or 3d of uint or int, access::read_write)
declares its slot R32ui or R32i, as Vulkan's image atomics require and as Metal requires an R32Uint
or R32Sint texture there. Under the identity domains identity_class refused every storage
declaration with a format, so such a kernel was Unsupported{IdentityDomains}. It now admits an
R32ui or R32i storage declaration as the class StorageFormatClass::Format(R32_UINT | R32_SINT),
whose variable is the storage-image array's (set 1, binding 1, which every storage class aliases;
no link or declaration change). The atomic's emission takes the element of that array at the
index the slot's pushed resource ID holds (emit::identity_id), as a read or write does; it took the
array variable itself before, which no path reached. The default domains are unchanged.
Still refused under the identity domains: ulong atomics, texture-buffer atomics and an argument
buffer's atomic texture.
The CPU interpreter models OpImageTexelPointer (unmodelled before): a pointer to a texel inside
its image (Root::Texel), through which an atomic reads and writes the texel's first component, as
an atomic of an R32ui / R32i image does. Robustness's atomic outside the image and one on an
unmapped texel stay unmodelled.
Conformance: swizzled-storage-atomics now makes its pipeline and meets the runtime's
Gap::SwizzledReadWrite at its first dispatch (case/RRRR/dispatch), where a read_write slot bound to
a swizzled texture is refused; its known-gaps-rt.tsv row moves there and says why: Metal's atomic
answers the texel unswizzled, but nothing yet says a slot's reads are atomics alone.
Docs: RESOURCE-ID.md's arrays name the R32Uint / R32Sint storage class of a texture atomic;
API.md's identity forms name a texture slot's atomics (the paragraph's lines reflowed);
CONFORMANCE-COVERAGE.md re-derived for the atomics row's reason (REFUSALS.md re-derives
unchanged).
Test: engine_identity's a_texture_atomic_is_the_r32_storage_element_its_resource_id_names: a
generated texture2d<uint, access::read_write> atomic_fetch_add under the identity domains on
lavapipe, moltenvk-m3 and moltenvk-m3 without robust image access; each passes L3, its one image
class is R32_UINT storage at set 1 binding 1, the guard's size query is there exactly where the
device lacks robust image access, and on the CPU interpreter each thread adds 5 to its texel of
element 2 (the one the pushed resource ID names), answers the texel it held, and no other element
changes.
SEMANTICS_VERSION 2233, one above development's (main renumbers at landing): a refusal becomes a
module. The old runtime's render descriptor key changes with it
(the_old_render_descriptor_key_keeps_its_value), pinned at landing.
Verified (potluck; the jobs ran this diff on development
|
||
|
|
62c563f564 |
replay: the over-copies' causes among the executed counters
The report counted over-copies and their bytes, and those over imported blocks, but not why the runtime keeps each texture in an image of its own. The runtime already splits them by cause in Metrics (over_copies_host_memory, _pitch and the ten like them, each with its bytes). The backend now reports all twelve pairs, so a frame's, a completed group's and the total's over-copies split by cause. This is what the planner asked for to split the 48,710 small over-copies across the link. Validation only; the runtime is unchanged. The replay stage test now also checks that two of the keys are there. |
||
|
|
9027bd2aa3 |
rt: count scheduled-to-start under earlier GPU spans, GPU-end-to-handler steps and calibrations
The clean 5080 re-play's print needs three things the stage sums alone cannot give.
First, how much of each command buffer's span from scheduling to GPU start lies under other
command buffers' GPU spans, the runtime's own uploads and copy-ins included, against the part
under none of them. This is Metrics::scheduled_to_gpu_start_behind_nanos.
Second, its span from GPU end to handlers split at the completion thread's own steps. This is
Metrics::gpu_end_to_handler_steps_nanos, six steps:
- seen: GPU end to the thread seeing the completion;
- told: telling the submit thread;
- stamp read: reading the round's timestamps;
- calibration: a calibration, where the round runs one;
- earlier: the round's earlier retirements, their handlers included;
- own: its own retirement until its handlers begin.
The same steps are kept for the command buffers of 1,024 us or more (gpu_end_to_handler_tail
and its steps), so a 1-8 ms tail can be placed in a step.
Third, the calibrations and their calls' time. The counter that only the tests had becomes
Metrics::calibrations, beside calibration_nanos.
The replay backend reports all of these as executed counters.
Counting only; nothing changes form. There are no new waits, locks or allocations. What each
count costs:
- Completion thread, per round: two clock reads (the stamp read's start and end), and a third
where it calibrates. The period check reuses the stamp read's end, so it no longer reads the
clock itself.
- Per command buffer retired: one clock read where its retirement begins, then for one that
counts stages:
- one pass over a fixed ring of the latest 128 GPU spans, a stack array in the completion
thread;
- a sort, on the stack, of those that meet its span;
- one relaxed atomic add for the behind part;
- six for the steps, and seven more for one in the tail.
- Per upload or copy-in retired: the timestamps it already read go into that ring. There is no
second query read.
- Per calibration: two clock reads and two relaxed atomic adds.
Retirement returns an upload's and a copy-in's two timestamps (times::retire_own). The
completion thread places them on the host clock by the calibration as it stands
(Calibration::at, which moves nothing), and the program's command buffers' spans as placed.
Tests:
- host tests for the ring's merged, clipped union and its oldest-first replacement;
- a host test for the round's steps adding up to the span;
- the device stage test now checks that the six steps add up to gpu_end_to_handler_nanos, that
the behind part is at most scheduled_to_gpu_start_nanos, and that the device start
calibrated;
- the replay stage test checks the same through the report's keys.
|
||
|
|
83049f641a |
rt: the pixel interlock orders a raster order group on the memory the function reads and writes
Device creation enables VK_EXT_fragment_shader_interlock where the device lists it, and its
fragmentShaderPixelInterlock where the device reports it (floor's PIXEL_INTERLOCK, one of the
optional extensions; the sample interlock and the shading-rate interlock stay off). The
translator's profile then has the feature, and a fragment function's raster order group on a
buffer, a texture or an argument buffer's member it reads and writes compiles to its one form,
the body inside PixelInterlockOrderedEXT. A device without the feature keeps the typed refusal
(RasterOrderGroups, naming FragmentShaderPixelInterlock). Of the venues probed, KosmicKrisp on the
M3 Max and RADV on the RX 550 list neither the extension nor the feature (vulkaninfo, jobs
m3-max-61291 and m3-max-61296); every other venue reports it, the UHD 630's Windows driver
included (m3-max-61292).
Under the identity domains the interlock chooses no other form. The new
lower::fragment::interlock_forms(p) is pixel_interlock and not identity(p), and it now gates
every form the interlock chose beyond a raster order group's: the fetch's storage form
(interlock_orders), the blend, merge or logic operation computed over it (color::unordered),
the stencil output's storage form (stencil::device_form), the imageblock (imageblock::require),
the snapshot read (snapshot::finish) and the binding plan's snapshot (bind/graphics.rs). Each of
these is a storage image bound through a descriptor, which the identity domains hold none of,
so under them each keeps the form or the refusal it had before the enable, refusal text
included. rog::mode and the device report read the feature itself, as before.
A raster order group on a colour attachment: the lowering enters no critical section for it.
The interlock cannot order the attachment's own write, which happens after the function, so a
group on the colour input, or on a colour output of an attachment the function reads, keeps
the fetch's own ordering: the attachment's pushed texture read at its pixel, ordered after the
earlier draws of the pass and not within its own draw. That difference stands as the static
PrecisionNote::UnorderedFetchWithinDraw the read records, in the runtime README's Known gaps of
render encoders and in docs/API.md's catalogue; both now say the pixel interlock's devices are
included and why.
The storage-image forms of fetch, stencil, colour, imageblock and snapshot are unreached under
the identity domains after this. They are not deleted here; they go to cutxlate's queue.
Tests: the runtime's tests/pixel_interlock.rs draws rog_buffer (engine fragment_rog) four times
over a whole target in one draw on every device of the cfg's kind: the state is made only where
the profile has the feature, each pixel's float sums to 4 and its texel holds the fourth
fragment's sum; elsewhere the state is refused naming RasterOrderGroups. tests/floor.rs adds
the_pixel_interlock_is_enabled_where_reported (the sample interlock stays false) and chains the
structure as Device::open does. The translator's
tests/engine_identity_interlock.rs builds rog_buffer and fetch_ordered under the identity
domains on lavapipe's profile with and without the feature: rog_buffer interlocks and passes L3
with it and is refused without it; fetch_ordered has no interlock, no storage attachment, the
UnorderedFetchWithinDraw note and FetchedColor { color: 0 }, its modules word-identical either
way.
Docs: the runtime README's extension table, a Pixel interlock section under Floor with its
feature table, the raster-order-group gap of render pipeline states (now refused only on a
device without the feature) and the fetch gap; docs/API.md's UnorderedFetchWithinDraw entry;
rog.rs's and fetch.rs's module docs. docs/REFUSALS.md is unchanged (its check passes).
api_signatures.tsv re-blessed for floor::Features's new interlock field.
SEMANTICS_VERSION 2231 is a placeholder one above development's 2230: under the identity
domains a profile with the pixel interlock now takes, for a fetch, a stencil output, a blend,
an imageblock and a snapshot, the form a profile without it takes.
Verification: the lint, test, validation and states-only play jobs are named in the hand-off.
|
||
|
|
b1b5168fd6 |
Replay report: untimed waits, the runtime's stage sums and its stage histograms by frame
The 5080 play of a 3090 compute recording waited 42.5 s of 95.1 s wall with 23.1 s of gpu_busy; before a fix is ruled on, the report must say where the other 19.4 s went. Three reads were missing from it: - A waited command buffer with no GPU interval (start 0, or end not past start) adds nothing to gpu_busy while its wait counts in full. Each frame's end line now has untimed_waits and untimed_wait (the wait spent on them), and the report sums them in an `untimed waits` line. - The runtime already histograms every command buffer's commit to scheduled, scheduled to GPU start, GPU run and GPU end to handler, but only in power-of-two buckets, which give no seconds. Metrics now keeps each stage's sum beside its histogram (commit_to_scheduled_nanos and the three like it), counted in the same call as the bucket. - The player printed none of it. The backend's executed counters, so every frame line and the total, now carry the four sums, held_starts and held_start_gap_nanos, runtime_command_buffers and runtime_command_buffer_gpu_nanos (the uploads and copy-ins that run outside every Metal command buffer's GPU interval), and untimed_command_buffers. The four histograms print at the play's end as `stages F ...` lines, cumulative as each frame ended, and `stages end ...`. They are not per-frame counters, so the 69k `completed` lines of a long play do not grow by 92 keys each. Tests: the runtime's stage histogram test also checks each sum against the three command buffers' own times (exact for the first three stages, bounded by the host time after each finished for the fourth); a player test on the synthetic backend counts a frame's untimed waits (none and zero-length intervals) and the report's sum; a lavapipe replay test reads the new counters and the stages lines across two frames. |
||
|
|
0aa20c8bbf |
Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development` while this branch was in flight, so the copy committed here counted a smaller one. Verified: regenerating at this tip leaves no change beyond the `Generated at` stamp. |
||
|
|
bb9a63810b |
rt: a draw fills its functions' bicubic word, as a dispatch does
A render state whose vertex or fragment function samples a 2D texture slot through a bicubic constexpr sampler was refused at creation (Gap::RenderPipeline, DrawInput): render::draws had no arm for the translator's PushField::BicubicTexels, and fill_push wrote nothing for it. A dispatch fills the same field for a kernel's slot. Now a draw means by the field what a dispatch does. render::draws places the field (FieldValue::BicubicTexels of the slot, in the stage's table) and lists the slot in the content's own Draws::bicubic. The draw's checks (Facts::find), which run only when the pipeline state or a binding changes, refuse a bound texture with no bicubic word with the dispatch's typed gap, Gap::BicubicTexels naming the slot and the format (an 8-bit sRGB format, whose taps Metal filters decoded, a compressed, YUV, stencil, integer or extended-range one). fill_push writes the word from the bound texture's format and swizzle (bicubic_texels_word), or BICUBIC_TEXELS_UNBOUND for a slot that holds no texture. A bicubic sample at pixel coordinates or of a 1D texture stays the translator's refusal under the identity domains, as for a kernel. Nothing new runs on the draw path of any other pipeline. The check loops over the content's own list, Draws::bicubic, which render::draws fills only from a BicubicTexels push field: empty for every other content, so its check is a loop over nothing, once per change, never a per-draw scan. The fill is the match arm of that field, which no other content has. The device test asserts the list is empty for a state without a bicubic sampler (colored_fragment). Both stages are covered. The fragment half uses the fixture bcu_fragment. The vertex half uses a new owned fixture, bcu_vertex: a vertex function samples at p[vid] through a clamp-to-edge bicubic sampler at normalized coordinates in the implicit form, and bcu_vertex_color writes the sample. Its companions come from scripts/regen-air-fixtures on the M3 (m3-max-61235, Metal 32023.922, SDK 27.2), with its TOOLCHAIN line. It has no corpus case. Gap::BicubicTexels's docs and text now name a dispatch or a draw and "a function" in place of "a kernel". docs/REFUSALS.md is regenerated, and the ledger row of bicubic-texel-classes' sRGB dispatch carries the new text. RUNTIME_VERSION 2547 -> 2548 (placeholder): a run of an unchanged render artifact with a bicubic slot now draws where it was refused. Basis: this is NOT documented Metal. The MSL spec lists only nearest and linear filters, and 'bicubic' appears nowhere in the spec or the feature-set tables. It is built because a guest already uses the bicubic constexpr sampler in kernels, which is why the kernel half exists. Filling the field for a draw completes that one form and adds none. Test: tests::bicubic_draw's every_device_draws_a_bicubic_sample_in_each_stage, for each stage: - the content lists its one slot, and the field is in the push range; - each of six formats pushes its bicubic_texels_word, and an empty slot pushes the unbound word; - an RGBA8Unorm_sRGB texture is refused with Gap::BicubicTexels naming slot 0 and the format; - an RGBA8Unorm texture whose texels are all one value renders that value at every pixel. |
||
|
|
846f7c1428 |
Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development` while this branch was in flight, so the copy committed here counted a smaller one. Verified: regenerating at this tip leaves no change beyond the `Generated at` stamp. |
||
|
|
d3d40dd31e |
Identity domains: an argument buffer's texture sampled through the argument buffer's own sampler
Under the identity domains, an argument buffer's sampler was refused. Its cubic test pushed the
execution status address ("an encoder value the function reads as ExecutionStatusAddress"), and
behind that was the form's own refusal ("an argument buffer's sampler"). The sampler's resource ID
is now its handle, read from the member's 8 bytes with no sampler table (access::handle,
emit_identity_sampler):
- Its index selects the element of the set-1 sampler array of its use. That is the array an
argument buffer's sampler already declares, at the same binding the slot samplers' identity
arrays use.
- The word's fields (pixel coordinates, the nearest-pixel test) come from the ID's high word
(sampler::emit::heap_sampler_field).
- The handle is a uvec2 wherever it is held (lowered_pointer, and word_repr for a member word).
A select's null operand is the nil ID.
Bad-ID guard: compare-and-select, index < 4,000 ? index : 0, so an index past the arrays samples
through element 0, the default sampler. I chose it over 4,096-element arrays with a 12-bit mask
because it is two instructions with no layout or floor change. The mask would need every array at
4,096 elements and every unowned element holding the default sampler, which the floor does not
state. pipeline::link::IDENTITY_SAMPLERS becomes pub(crate) for it.
No cubic test under the identity domains (sampler::select::cubic_reach returns early). The runtime
makes no sampler state of a cubic filter (Gap::CubicSampler), so no live ID's word carries bit 30.
The runtime README says so beside the gap, and docs/RESOURCE-ID.md says how the shader reads the
ID.
The conformance ledger's 32 rows refused only by the cubic mark now run through the runtime. On
lavapipe:
- 3 match: pixel-samplers-rgba16f-nearest-{border,edge,zero}.
- 5 are refused at case/encoder, Unavailable argument_encoder or argument_encoder_with_arguments:
the rt side has no argument encoder.
- 24 differ. In each, every source our side runs answers alike wherever Metal's do.
Their 32 rows become 192 rows scoped to llvmpipe, each naming its note and bound:
- pixel-downscales: pixel-sampler-scaling, 2/255.
- pixel-samplers linear: device-sampling.
- rgba8 nearest and subnormal: device-texel-conversion.
- the two nearest mirror norm sites: device-sampling, the device's mirror clamp to edge at
normalized coordinates, which a device test shows a slot's sampler and an argument buffer's
read alike.
docs/CONFORMANCE-COVERAGE.md is regenerated for the ledger (7,490 rows to 7,650).
pixel-samplers now declares the slot form's pixel-sampler-scaling on nearest states as well
(replay::pixel_sampler_scaling_notice): under the identity domains the slot's word is read at
dispatch, so the note is the operation's on any state.
SEMANTICS_VERSION 2231 (a placeholder for the landing to renumber).
Tests:
- engine_identity's
an_argument_buffers_sampler_samples_through_the_identity_arrays_by_its_resource_id covers
tail_argument_samplers' four kernels and tail_argument_cube_gradient on every profile: L3, set
0 empty, set 1 the identity layout, the bindings used, no sampler slot ID, constexpr index or
status address pushed, and no RuntimeFact::CubicArgumentSampler.
- metal2vulkan-runtime tests::argument_sampling (lavapipe, m2v_cpu_icd):
- argument_sampler_edges through a linear state reads the edge averages; through an ID of that
word with index 4,000 it reads element 0's nearest texels (the guard).
- every_device_samples_alike_through_an_argument_buffers_sampler_and_a_slots: one texture at
the pixel-samplers case's 800 normalized coordinates through one nearest state under clamp to
edge, to zero, to an opaque white border and mirror clamp to edge, bound at a slot and held in
an argument buffer; bit-equal.
- validation's an_argument_buffer_sampler_samples_its_member_texture compares the runtime's run
with Metal's texels, where it held the refusal.
Verified (potluck jobs; this commit's tree equals WIP 16c70bf88a on
|
||
|
|
34c25738ee |
Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development` while this branch was in flight, so the copy committed here counted a smaller one. Verified: regenerating at this tip leaves no change beyond the `Generated at` stamp. |
||
|
|
9b1026e61b |
Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development` while this branch was in flight, so the copy committed here counted a smaller one. Verified: regenerating at this tip leaves no change beyond the `Generated at` stamp. |
||
|
|
1687f8fc38 |
Validation: a 32-bit float depth texture is filled by a draw through the runtime, and a depth outside [0, 1] is the runtime's limit
The runtime takes no upload of a 32-bit float depth (Gap::FloatDepthUpload, which its own texture and blit tests hold both ways). Kernel and render cases that bind a Depth32Float texture stayed on the executor's own context. Now they run through the runtime: the run fills each such texture by a draw, as a guest fills one. The fill: - The owned fixture depth_fill.metal is regenerated with scripts/regen-air-fixtures on the M3 (m3-max-61107). It holds a fullscreen vertex function and a fragment function that writes depth(any) from a buffer of texels by pixel. - platform::runtime_depth draws one pass per level and slice into the texture's depth attachment, under an always-passing depth test that writes. The texture is made with RenderTarget usage beside its declared usage. DepthOutsideUnitRange becomes the runtime's limit (Limit::Runtime) and qualifies on Metal, as ruled. A draw writes depths clamped to the viewport's [0, 1], so no runtime call puts a NaN, a negative value or a value above 1 where Metal's texel holds it. The case checker now raises the requirement from the case's literals on every device (executor_contract::case_requirements, via depth_range::depth_range_requirement). The literals checked are each Depth32Float texture, each texture-array element, each argument buffer's texture, and the depth attachment's initial depth. The old executor's device-gated check (plan_resources::require_depth_range, which read VK_EXT_depth_range_unrestricted) and its two call sites are deleted. The fill refuses such a depth too, typed, so it never clamps one silently. No source fact carries the requirement, so the source census is unchanged. Of the committed public cases, 7 kernel cases close as runtime-refused (4ac0d4322d, 5d9f284f87, 70064cea52, f04e9b48c8, 59b3a9a43e, 6955da3062, b3d8e09b92). Their Metal rows stay as committed. ENGINE_EXECUTOR_ABI goes to v191. Tests: - Unit: the requirement from each literal kind, and its limit, stops and evidence gap. - The Runtime and qualifies_on_metal lists. - Routing: a Depth32Float texture now routes. - Device: a_float_depth_texture_is_filled_by_a_draw_and_reads_back_as_authored. Both runs read eight depths of a 4x2 texture back exactly, and through the runtime a depth of 2.0 is refused as depth_outside_unit_range. - The device test of the old gate is deleted with the gate. |
||
|
|
acc706ca47 |
Identity domains: a sequentially consistent fence is refused naming the fence
The translator orders a seq_cst fence (atomic_thread_fence of memory_order_seq_cst beyond the
thread, or a seq_cst barrier whose memory scope is the device) through an increment of the
command buffer's ExecutionStatus word. The identity domains reach no such word. Their refusal was
the generic one at the plan's end, which named the push field the fence asked for: "an encoder
value the function reads as ExecutionStatusAddress". require_seq_cst now refuses the fence itself
under the identity domains, as Unsupported{IdentityDomains}, not implemented, naming its Metal
form, "a sequentially consistent fence" (barrier::SEQ_CST_FORM). It stays refused; the default
domains compile it as before.
Docs: the runtime README's known gap of the forms the identity domains do not lower gains the
fence and its test. Validation's executor_contract::seq_cst_fence and
ToolingRequirement::SeqCstFence docs name the new text. docs/REFUSALS.md is regenerated (the
IdentityDomains row gains the barrier.rs site).
Tests: engine_identity's new
a_seq_cst_fence_is_refused_naming_its_form_under_the_identity_domains (a4_device_fence on
lavapipe and moltenvk-m3: under the default domains it compiles and states ExecutionStatus; under
the identity domains it is refused IdentityDomains, NotImplemented, symbol "a sequentially
consistent fence"). Validation's
a_seq_cst_fence_is_refused_through_the_runtime_as_its_requirement_says now looks for the fence's
name in the runtime's error.
SEMANTICS_VERSION 2230 (placeholder; main renumbers): a refusal's text changes.
Consumer check: no public item is added or removed.
Verified: m3-max-61154 (msi) at this commit's tree: fmt, clippy (plain, --cfg m2v_gpu and
--cfg m2v_cpu_icd) and Rustdoc green; nextest of metal2vulkan, -conformance, -validation and
-runtime, 5880 of 5881 passed, the new identity test among them; the one failure is
the_old_render_descriptor_key_keeps_its_value, which moves with SEMANTICS_VERSION and waits for the
next named pin. Only the refusal's text changes, so no play.
|
||
|
|
8528603a73 |
Validation: a vertex or fragment case of one sample draws through the runtime
A render case of one sample now draws through metal2vulkan-runtime's public API on Linux, in the stated leg and with no profile restriction, as a consumer draws it. That covers its own stage's buffers, bound textures and samplers, function constants and linked functions, and its generated companion. It also covers vertex buffers at static strides, Shared 2D color targets loaded and stored by the pass, the oracle's depth-stencil state, cull mode and winding, and one direct or indexed draw of primitives. The case observes a buffer, a texture, a color target or nothing. A rasterization-disabled vertex case renders into the oracle's 1x1 R8Unorm attachment, which its pipeline declares at index 0, as the oracle's does. engine::runs_render_through_runtime decides the route from the case's structure alone, naming every RenderCase and StageResources field. These keep a case on the executor's own context: - a depth/stencil attachment; - more samples; - layered rendering; - a dynamic vertex stride; - an argument-buffer member, object or command buffer; - a function table; - tessellation; - an imageblock; - a rate map; - an out-of-bounds target; - a fragment pass with no color target (the runtime makes no pass without an attachment, Gap::RenderPass). The kernel route's attempt, validation log, device, ceilings, sampler numbering, buffers, submission and row are now shared helpers in platform::runtime. runtime_textures makes one function's textures and samplers at the run's next indices, so both stages of a draw take disjoint ones. ENGINE_EXECUTOR_ABI goes to v190: render rows of the routed shape now record the runtime's answer. Tests: - a unit test pins the routing both ways; - three device tests (the passthrough fragment, the observed vertex at its varying and its position, and the rasterization-disabled vertex store) run the runtime arm on Linux against the same expected bytes. |
||
|
|
dc21cd66c7 |
Colour groups go: no render variant draws a group of a pipeline's color attachments
A device draws to at most the lesser of its maxColorAttachments and maxFragmentOutputAttachments color attachments at once. A pipeline with more (or one at an index at or past that count) was compiled as color groups: a variant per group (VariantKey::color_group) whose fragment function wrote the group's colors at locations 0.., with the group's attachments alone in its graphics state, and the runtime drew each group in a pass of its own. The runtime's floor requires 8 of both limits (floor.rs), Metal's count, so no device it runs on takes a group, and it asks for every render variant with VariantKey::new(); nothing in it reads GraphicsState::color_group. The groups, their inputs and their note are deleted. Such a pipeline is now refused where it was already refused without a group: InterfaceComponents at MaxColorAttachments (link) or at MaxFragmentOutputAttachments (the fragment's outputs). Removed: - pipeline/compile/color_group.rs (group, descriptor, entry, refusal) and the compile layer's use of it: FragmentPass::color_group, InputsFrom::color_group, grouped_entry, and the grouped descriptor in compile_render_pipeline_keys and render_pipeline; - the inputs and keys: ColorGroup (with of, width_on, colors, groups, location), VariantKey::color_group, LoweringInputs::color_group and its key bytes, the pipeline key's " color_group N" field (variant_fields); - link: RenderLinkInputs::color_group, LinkInputs::render_variant's group parameter, and link's group check (a fragment stage of another group, and the per-group refusals); - the state: GraphicsState::color_group and StageIo::color_group; - the invariance: the stage plan's invariant_fragment_outputs and its Invariant decorations of FragDepth, SampleMask and FragStencilRefEXT; the module builder now decorates Position and ClipDistance alone, the outputs nothing else made invariant; - PrecisionNote::ColorAttachmentGroups, its conformance Degradation, its comparison allowance and its catalogue entry in docs/API.md; - validation: the census's color_groups and color_limit, which translated a fragment function of more colors than the profile draws as one module a group, and with them PendingL3::groups, PendingModule and the L3 stage's later modules: an attempt is one module again. ENGINE_CENSUS_VERSION 8; - the runtime's translator_fields row for color_group. Tests: - engine_color_groups goes, and engine_primitive_ids' color_groups_share_the_vertex_function_s_id. - validation's a_fragment_function_of_more_colors_than_the_floor_translates_in_color_groups becomes a_fragment_function_of_more_colors_than_the_device_draws_is_refused: on a four-color profile cg_five, cg_seven, cg_sparse and cg_counts keep their limit refusal; on lavapipe each translates. - the builder's invariance test: FragDepth is refused like PointSize. - api_tests, api_surface and the variant key's debug text lose their rows. The color_groups and color_groups_fetch fixtures stay (engine_dead_reads, pass_attachment_pairs and the fixture tables read them). docs/API.md's paragraph on groups now states the two limit refusals; docs/VALIDATION.md's census row loses its sentence. api_signatures is blessed; docs/REFUSALS.md is regenerated. SEMANTICS_VERSION 2228, ARTIFACT_FORMAT_VERSION 573 (placeholders; main renumbers). SEMANTICS: a pipeline that took groups is refused, and the note goes. ARTIFACT: the codec loses ColorGroup, StageIo's and GraphicsState's fields and a PrecisionNote variant. RUNTIME_VERSION stays: the binder never read a group, and the runtime pin does not move. Consumer check (consumer-uses.sh, consumer development 0140a12682, 60 refs): 0 hits (code) for ColorGroup, color_group, width_on, render_variant and color_groups. ColorAttachmentGroups: 0 on development; used in crates/reims-vgpu-vulkan/src/answer.rs on 37 of the consumer's steelbrain/* branches, a crate its development no longer has. Verified: m3-max-61080 (msi) at the tree before the import fix: nextest of metal2vulkan, -conformance, -validation and -runtime, 5878 of 5879 passed; the one failure is the_old_render_descriptor_key_keeps_its_value, which moves with SEMANTICS_VERSION (main pins it at a named pin). Its clippy step found validation's InternalError import unused; m3-max-61112 (um790) at this commit's tree: fmt, clippy and Rustdoc green. States-only plays on lavapipe of the probe player built at the change (steelbrain/cutxlate-cgplay, m3-max-61082): m3-max-61087 to 61091, 61 runs over the 36 streams, render 502920 states made and 0 refused, compute 108189 made and 0 refused, the counts of the plays before the change. |
||
|
|
a8d448f4ce |
Depth stand-ins go: no variant runs its draw's depth or stencil test in the shader
The runtime asks for every render variant with VariantKey::new() (render.rs) and never states
FragmentTests, so VariantKey::shader_tests, shader_stencil and window_depth_varying are false on
its path. No variant it makes tests a fragment's depth or stencil against a stand-in of the pass's
attachment. That variant, its stand-ins and their consumer contract are deleted. The consumer
names none of them on its development branch (consumer check below).
The binder: for a fragment function that stores before Vulkan's tests (TestedStorageWrites), a
draw whose depth test writes (FragmentTests::Depth { writes: true }) or whose stencil test acts
(Stencil, or Drop for a function without the early-tests variant) ran the in-shader variant. It is
now refused NotImplemented at the tested attachment, of the feature that stores first
(FramebufferFetch, or Imageblocks for an imageblock alone):
- a function with the early-tests variant: at the depth attachment for Depth, at the stencil
attachment for Stencil;
- a function without it: at the depth attachment, or the stencil one where the pass has no depth,
as Any already was.
A draw whose tests drop but write and count nothing keeps the early-tests variant, and one whose
tests drop nothing runs the pipeline as compiled, as before.
Removed:
- the inputs and keys: VariantKey and LoweringInputs::{shader_tests, shader_stencil,
window_depth_varying}, and their key bytes;
- the lowering: lower/fragment/depth_test.rs (DepthTest, StencilTest, depth_test_form,
stencil_test_form, depth_test_word, stencil_test_word, STAND_IN_FORMAT) and its calls from
fetch's and the imageblock's tests, and the stencil output stage_io stored nowhere under it;
- the window depth varying: IoRole::WindowDepth, VaryingKey::window_depth, the vertex function's
store (stage_io's WindowDepth) and the fragment's input, and its link checks;
- the facts and state: RuntimeFact::ShaderTests and ShaderStencilTest, GraphicsState::shader_tests,
ShaderTestsUse, StandInUse, StandInView, link/shader_tests.rs, and compile::api's stand-in
requirements;
- the bindings: SyntheticBinding::DepthStandIn and StencilStandIn, WriteSource::DepthStandIn and
StencilStandIn, PushField::ShaderTestsState and ShaderStencilState, the binder's push words and
ShaderTestsTemplate, and BindState::{depth_range, depth_clip_mode_clamp, stencil_references},
which only those words read;
- the copies: DepthStencilCopy::DepthFromStandIn, DepthStandInForm, DepthSplitModule and
depth_split_module;
- the notes and kinds: PrecisionNote::ComputedSampleDepth (and its conformance Degradation, C3
deferral and comparison rows, and its catalogue entry in docs/API.md),
Feature::MultisampledShaderDepthTest (and its reach row), DriverDeviation and VkProperty
CenterFragCoordDepth and SampleFragCoordDepth, which nothing else reads;
- DrawReplayRule::ShaderTests, and the mechanism rows of the two facts;
- the runtime's translator_fields row for shader_tests.
Tests:
- engine_fragment: the discarding fetch beside depth expects a depth test that writes refused at
the depth attachment and a stencil test that acts at the stencil attachment. The per-sample
depth test, the memory-writing fetch's Drop draw, a returned depth
(a_fetch_that_returns_its_depth_refuses_a_draw_whose_depth_test_writes, which keeps the compiled
pipeline's checks) and a returned stencil or mask
(a_returned_stencil_or_sample_mask_refuses_a_draw_whose_tests_act) expect the refusal. The
stencil test in the shader goes.
- engine_fragment_imageblock: a tested imageblock writer's depth draw is refused
NotImplemented(Imageblocks) at the depth attachment.
- engine_moved_writers: the writers' wanted tests are the early-tests variant alone; a draw that
ran the function's own tests is refused.
- depth_stencil_copy, owned_divisions, the mechanism table, api_tests, the binder's templates, the
variant key's debug text: their stand-in rows go. The binder's stencil words test goes.
api_surface loses its rows; api_signatures is blessed; docs/REFUSALS.md is regenerated.
SEMANTICS_VERSION 2227, ARTIFACT_FORMAT_VERSION 572, RUNTIME_VERSION 2547 (placeholders; main
renumbers). SEMANTICS: the binder's plans of such draws change, and the key bytes go. ARTIFACT: the
codec loses SyntheticBinding, PushField, RuntimeFact, IoRole, VkProperty and PrecisionNote variants,
GraphicsState's field and three structs. RUNTIME: plans and BindState change. The runtime pin
moves.
Consumer check (consumer-uses.sh, consumer development 0140a12682, 61 refs): 0 hits (code) for
ShaderTestsUse, StandInUse, StandInView, shader_tests, shader_stencil, window_depth_varying,
DepthStandInForm, DepthSplitModule, depth_split_module, DepthFromStandIn,
MultisampledShaderDepthTest, CenterFragCoordDepth, SampleFragCoordDepth, ShaderTestsState,
ShaderStencilState, DepthStandIn, StencilStandIn, WindowDepth, window_depth, stencil_references,
depth_clip_mode_clamp, ShaderStencilTest, DepthTest and ShaderTests; depth_range in link-order
lists only. ComputedSampleDepth: 0 on development; used in crates/reims-vgpu-vulkan/src/answer.rs
on 38 of the consumer's steelbrain/* branches, a crate its development no longer has.
Verified: m3-max-61056 (msi) at this commit's tree: fmt, clippy, Rustdoc, and nextest of
metal2vulkan, -conformance, -validation and -runtime, 5885 of 5886 passed; the one failure is
the_old_render_descriptor_key_keeps_its_value, which moves with SEMANTICS_VERSION (main pins it).
States-only plays on lavapipe of the probe player built at the change on
|
||
|
|
5b653bc1d4 |
Validation: a kernel case's argument buffers of buffers, textures and samplers run through the runtime
What: runs_through_runtime now routes a kernel case whose argument buffers hold buffers, textures
the runtime makes (`runtime_texture`) or samplers, observing a buffer, a texture, an
argument-buffer buffer or texture, or nothing. A pipeline state, a command buffer or a
rasterization-rate map in an argument buffer still keeps the case on the executor's own context.
How, as the Metal oracle does (metal::platform::argument_buffers):
- Each argument-buffer buffer is a Shared buffer of its bytes.
- Each argument-buffer texture is made as a bound one, with the usage its AIR member declares
(runtime_member_usages), at an index of the run's texture grant after the bound textures.
- Each argument-buffer sampler is its argument_sampler_descriptor at an index of the sampler
grant below the bound samplers.
- The owner's bytes hold each member's gpu_address or gpu_resource_id().to_bits() at its field
(engine::argument_buffers::owner_bytes), written before the owner is made, as a program writes
them.
- The encoder uses each member buffer and texture for reading and writing (use_resource).
- An argument-buffer buffer output reads the member's final bytes; an argument-buffer texture
output is read back as a bound texture's.
ENGINE_EXECUTOR_ABI is now vulkan-engine-v189. docs/VALIDATION.md's "Through the runtime" names
argument buffers.
Tests:
- The routing test routes a case of all three member kinds under both member outputs, and keeps
a texture-buffer member off the runtime.
- Three device tests run on the executor's own context and, on Linux, through the runtime:
- selected_member_texture: two argument-buffer textures chosen per thread;
- argument_sampler_sample: an argument-buffer sampler sampling its member texture;
- ob2_loaded_pointer, in bounds: an argument-buffer buffer loaded into `out` and stored
through, observed in the member.
Verified: in the lane's report (the compile gate and the family's proof, its 20 committed cases
on lavapipe against committed Metal, before and after).
|
||
|
|
999b82bfe2 |
player: a pipeline state's making counts what it made, lowered, loaded and VkPipelines, and a load makes its content new
What: each group and each slow making carries "L lowered, D loaded, P VkPipelines" (translations, translations_loaded, pipelines_created). A making is of "new" content where it made any of them, and "held" where it made none. Why: the warm pass of m3-max-60954 showed the first form calling a load-only compute state "held", and using the word "cold" in a second pass. Verified: the same test, which now also checks the counts and the held state's zero driver time, green in m3-max-60980. |
||
|
|
10d00d44b4 |
player: each pipeline state's making split into the translator's, the driver's and the rest
What: the replay report gains a `pipeline makes N states: ...` summary line and up to ten
`pipeline make slowest K #ID KINDS ...` lines, documented in docs/REPLAY-STREAM.md. KINDS is
kernel, vertex or post-tessellation vertex, plus +fragment.
How: each render and compute state's making is read from metal2vulkan-runtime's own Metrics on
the player's thread before and after it, with the wall time on rt::host_time (the counters' own
clock): translation_nanos against pipeline_creation_nanos, and the rest as "other". No runtime
counter is added. rt makes every state on the calling thread, and the only other thread that can
run beside a making is the player's own pre-pass. So the pre-pass pool now tallies its
prepare_dispatch calls begun and ended. A making that ran while one of them ran is counted
("beside a pre-pass call") and marked, since its figures include that call's work. The compute
states' `pipeline I wall_nanos=` lines take their wall time from the same clock.
Why: the next cold number needs its cause beside it: per pipeline, the translator's work against
the driver's vkCreate*Pipelines.
Verified: replay::rt_replay::each_pipeline_state_s_making_is_split_into_the_translator_s_and_the_driver_s_time
on lavapipe (m3-max-60980, with fmt, clippy plain, m2v_gpu and m2v_cpu_icd, and workspace
Rustdoc green). Without the line it fails at the summary-line find. On a real card: the cold and
warm states-only plays of one recorded stream on an RTX 3090 (m3-max-60954).
|
||
|
|
47d782f3a5 |
Fix forward of 14dca89bf9: lint, a float depth stays on the executor's context, a format the device lacks is not_enabled
What: the compile gate m3-max-60907 at 14dca89bf9 failed clippy twice and Rustdoc twice:
- `usage = usage | ...` becomes `usage |= ...`;
- `dispatched` takes its dispatch and threadgroup size as one argument;
- the public docs of `runs_through_runtime` and `RuntimeKernel` named private items as links.
The family's public proof (m3-max-60908, 218 cases on lavapipe against committed Metal, before
and after) showed 17 rows failing through the runtime:
- 15 bind a Depth32Float texture, whose bytes the runtime takes no upload of
(Gap::FloatDepthUpload). The executor cannot fill one, and a guest fills one by drawing.
`runtime_texture` now keeps such a texture on the executor's own context, where these rows
ran before.
- 2 bind R8Unorm_sRGB, which lavapipe's format query lacks. The runtime refuses it as
Gap::TextureFormat; before, the executor's own context recorded not_supported{not_enabled}.
`runtime_error` now maps that gap to NotSupported::NotEnabled with the gap's text. Every
other runtime gap still fails the row.
ENGINE_EXECUTOR_ABI is now vulkan-engine-v188. docs/VALIDATION.md's "Through the runtime" now
names textures and samplers, what keeps a case off the runtime, and the not_enabled mapping.
Tests: the routing test adds a Depth32Float texture, which is not routed. A new unit test
covers runtime_error's two mappings.
Verified: in the lane's report (compile gate and the focused rerun of the 17 rows).
|
||
|
|
81ced9a1cb |
Extended-range fetch and blend refused: what needs Metal's tile half is NotImplemented(Format)
Metal's tile memory holds an attachment of Apple's extended-range formats (BGR10_XR, BGRA10_XR,
RGB10A8_2P_XR10 and their _sRGB twins) as half through a render pass and rounds it to the codes
only at the store. A fetch of such an attachment, or a blend onto it after an earlier draw of the
pass wrote it, sees that draw's half. The attachment holds the codes. With the half shadow gone
(the commit before), such a read or blend would take the stored codes, which is wrong but valid
output. Both are now a typed refusal, NotImplemented(Format) at Attachment::Color(n), on every
device and in either fetch form. This is the same boundary as the runtime's own refusal of every
extended-range texture: Gap::TextureFormat (crates/metal2vulkan-runtime/src/error.rs:1011),
raised in texture.rs's form() (texture.rs:2416, `if !viewed(mapping.emulation)`), so rt never
makes such an attachment.
Where (lower::fragment::fetch::codes_round_the_tile names the forms: an extended-range form that
is neither padded nor bfloat):
- A fetch: color::select_param, beside the bfloat fetch's refusal. It runs for the storage form
and the input attachment alike. An integer read stays Metal's pipeline error
(InvalidDescriptor(ColorAttachment)).
- A blend into one the function writes, under any write mask:
- fetch::blended_extended_range, which both ordered devices' plans call (the interlocked storage
form, and input_blend over rasterization-order input attachments);
- stage_io::extended_color::plan, on a device that orders fetch in neither form. It is checked
before the orderings' refusal, since no device would make the blend.
- The public door metal::format::extended_range_blend answers NotImplemented(Format) for those
forms on every device.
Unchanged: an unblended write and a masked merge (a kept code is the encode of the half the tile
keeps there). Padded forms (R10Unorm_X6, RG10Unorm_X12, their _sRGB twins, RGB10A2Unorm_sRGB):
their fetches and blends are built as before. Bfloat: its fetch is refused as before, and its
blend is Metal's error.
Dead with it: the source-range clamp only those blends took. Every caller of
extended_range::blend::native now passes a padded form's None. Removed: blend::extended_ranges,
clamped_lanes and native's ranges parameter, extended_range::source_range, and blend_color.rs
(SOURCE_RANGE, SRGB_SOURCE_RANGE). The validation build script's runtime inputs list
blend_color.rs no more, and the runtime pin moves. In the CPU-model tests: the XR forms' blend
cases and EVERY_FORM; the padded blends keep their model.
Docs: fetch's module docs (the extended-range paragraph, plus one on Apple's forms in place of the
"across draws" one), color's and stage_io::extended_color's, input_blend's, ExtendedRangeColor's,
PrecisionNote::ExtendedRangeBlendSource and ExtendedRangeFloatBlendSource (now padded only), the
door's, and docs/API.md (section 4's framebuffer fetch, and the two notes' catalogue entries).
docs/REFUSALS.md regenerated, api_signatures blessed.
Conformance (crates/metal2vulkan-conformance/known-gaps-rt.tsv), by expectation: the next round's
conformance replay on every card confirms them. 260 rows change their answer from "unsupported:
FramebufferFetch; needs AnyOf([[Feature(FragmentShaderPixelInterlock)],
[Feature(RasterizationOrderColorAttachmentAccess)]])" to "unsupported: Format; needs
NotImplemented", at the same metadata and color attachment. Their explanation now names the
refusal:
- xr-blend-* (108);
- xr-gamut-* (108);
- xr-gradient-*-blended (24);
- xr-masked-*-over (20).
The unblended masked rows (xr-masked-bgr10xr-red, -blue-green and their sRGB twins) keep the
orderings' refusal. The runtime's floor orders fetch in neither form, so its stage_io refusal is
what these rows record. docs/CONFORMANCE-COVERAGE.md is regenerated.
Tests:
- fetch::tests: the door's case splits Apple's forms (NotImplemented) from the padded blended
ones; on runtime-floor, R10Unorm_X6 keeps the orderings' refusal and BGRA10_XR is
NotImplemented; the moltenvk-m3 FragmentStoresAndAtomics case takes R10Unorm_X6.
- engine_extended_range::blended_pipelines: a `refused` helper (Format, NotImplemented,
Color(0)); the wide-gamut client pipelines are refused on every venue and runtime-floor; the
unwritten and masked test expects the refusal for every written blended shape.
- engine_extended_range::targets: a blended attachment, and lavapipe's fetch, expect the refusal.
- engine_fragment: a_fetched_extended_range_attachment_is_refused (every Apple form on every
committed profile, exf_fetch_three, and the whole pipeline on moltenvk-m3) replaces the made
fetch; the fast source-alpha-over sRGB XR blend and the input-attachment XR blend go, as they
covered refused forms only; the premultiplied blend test and the blend note's test move to
padded forms (RG10Unorm_X12 and its sRGB twin). con_fetch_coverage, the second-source blend and
tsw_fetch_discard keep their storage-form and coverage mechanics on RGB10A2Unorm_sRGB, the
four-channel padded form, where the guests' pipelines had RGB10A8_2P_XR10; their docs say so.
- lower::arith::extended_range::tests: the padded forms' blend model alone.
SEMANTICS_VERSION 2225 (after guestgaps' 2224, on development
|
||
|
|
a950689934 |
Extended shadows go: no variant reads and writes an extended-range attachment's half shadow
Metal's tile memory holds an extended-range color attachment (BGR10_XR, BGRA10_XR, RGB10A8_2P_XR10 and their sRGB twins) as half through a render pass and rounds it to the codes only at the store. The binder offered a variant for a draw whose render pass instance held a half shadow of such an attachment (BindState/BindShape::extended_shadows, VariantKey::extended_shadows, LoweringInputs::extended_shadows). Its fragment function read and wrote an Rgba16f storage image beside the codes (ResourceKind::ExtendedShadow), either in the interlocked storage form or, on a device that fetches through rasterization-order input attachments, beside the input attachment (lower::fragment's input_shadow). metal2vulkan-runtime never asks for the variant and makes no extended-range texture (Gap::TextureFormat), so nothing reached it. Now no such variant exists. A function compiled with no shadow (every function, as before for every rt draw) is unchanged: a blend or fetch onto an earlier draw's write reads the codes that draw stored (extended_range::tile_value). Those differ from Metal's half where it is not a code's value, and fetch's module docs say so. Removed: - lowering: lower/fragment/input_shadow.rs (InputShadow and its plan, read, store and words), FragmentPlan::input_shadows, Declared::extended_shadows, the storage form's shadow (StorageColor::shadowed, declare_shadow, shadow_and_texel, shadow_read, the shadowed branches of texel, value, the write and its blended and merged forms, and their word estimates), and the input-attachment blend's, color read's and stage_io write's shadow branches. The loop over covered samples no longer has a shadow refusal. The blend's doc, which sat above merged_extended, now sits on blended. - pipeline: LoweringInputs::extended_shadows and its key bytes, VariantKey::extended_shadows, ResourceKind::ExtendedShadow, BindingSource::ExtendedShadow and its link arm, the fetch inputs' shadowed reads and writes and their tests and coverage (the input-attachment form passes no depth, stencil or coverage state, as before for an unshadowed draw), and the requirements trace's ExtendedShadow arm. MovableStorageWrites' doc loses the shadow. - binder: BindState::extended_shadows, BindShape::extended_shadows, WriteSource::ExtendedShadow, and the graphics binder's choice of the shadowed variant (its refusals of a mesh, layered, amplified or multisampled plain writer's shadow included). - tests: engine_fragment's four shadow tests and their helpers (image_accesses, shadow_image_types, execution_modes, interlocked); engine_moved_writers' shadow move (its Move enum goes, and the writers are checked with the interlocked move alone); the shape round-trip, the variant round-trip fixtures, the compile-key test's shadow arm, and the requirements test's ExtendedShadow kind. No SEMANTICS_VERSION bump: an input without shadows (every input a consumer can now state) lowers to the same words. Removing the shadowed branches leaves the instruction order of the unshadowed paths as it was, and the key appended shadow bytes only when the set was non-empty. ARTIFACT_FORMAT_VERSION 569 (after guestgaps' 568 on |
||
|
|
fd924dd9c8 |
Census: a requirement the runtime refuses is the runtime's limit, closed without a candidate run
The authoring-capability census stayed open on 66 rows, every one a
requirement whose shape metal2vulkan-runtime refuses: seq_cst_fence (14),
texture_buffer_member (6) and mesh_render_pipeline (46). Each was a tooling
gap (Limit::Tooling), which keeps a row unresolved, though no tooling the
executor could build would run them: the product refuses them.
The ruling is a third limit beside Limit::Metal. Limit::Runtime is the limit
of a requirement whose shape the runtime answers with a typed refusal, or for
which it has no call and the consumer refuses it itself. Its rows are closed
without a candidate run and counted apart: runtime_refused beside
metal_refused, in the summary line and in each executor's stops line. They
stay unresolved only where a tooling gap of their own keeps them open. What
the runtime runs and the executor cannot drive stays Limit::Tooling. This
replaces the first lane's "no new Limit" ruling.
- seq_cst_fence: the runtime refuses the pipeline at its make as
Unsupported{IdentityDomains}. Both ways on lavapipe: the existing
a_seq_cst_fence_is_refused_through_the_runtime_as_its_requirement_says,
and the new a_fence_of_another_order_is_made_through_the_runtime (the same
two stores around an acq_rel fence, made and run, its words checked).
One-off over the census's 14 rows (m3-max-60840, a probe that never
lands): each row's own make through the runtime on lavapipe, with no
input, is the named refusal, not_implemented IdentityDomains, 14 of 14.
- texture_buffer_member: two device tests, each both ways.
a_texture_buffer_is_refused_where_a_2d_texture_is_made: new_texture
refuses a texture buffer as Gap::TextureBuffer and makes a 2D texture of
the same format.
a_texture_buffer_member_is_refused_at_the_make_where_a_2d_member_is_made:
the make of a kernel reading an argument buffer's texture buffer is
refused as Unsupported{IdentityDomains}, and the same read of a 2D member
is made.
- mesh_render_pipeline: the runtime has no mesh call, and the consumer
refuses mesh itself (the runtime README's known gap). Without a call there
is no device test; that README sentence is the guard. The requirement's doc
says the limit flips when a guest's mesh pipeline is built.
- The new owned fixture rlm_runtime_limits (regenerated with
scripts/regen-air-fixtures on the M3, m3-max-60866) holds the acq_rel
fence and the two member reads. A triage test checks the classifier
takes each shape and not its pair.
- The platform's runtime device opening is factored out (opened), so the
device tests can make a texture or a pipeline alone under the validation
layer (on_runtime_device, make_kernel; both test-only).
- The analyzer version is now structural-triage-v85. docs/VALIDATION.md
states the closure. AGENTS.md's census bullet stays true as written.
Verified: the compile gate and the census, both named in the lane's report.
|
||
|
|
7bbc00287d |
DeviceFragmentRuns names what follows the run count; section 10's intro admits notes
The note's doc and docs/API.md's entries (section 9's note, section 10's Draws entry) said only that a memory-writing fragment's writes repeat as the device's runs. Whatever the function derives from its own writes across runs follows the same count, its stored colours and its [[sample_mask]] output included: the conformance fixture coverage_outputs' cvo_masked writes the mask 1 << run, so at pixel rate on a device that runs once only sample 0 keeps its colour. Section 10's intro said its entries carry no degrade notice; the SIMD-group order entry and this one each name their static note, so the intro now says most carry none and an entry whose answer is the device's own names its note. Docs only: no emitted word or key changes. |
||
|
|
3ba18a4b19 |
A memory-writing fragment runs as the device runs it, noted DeviceFragmentRuns
What: a fragment function that writes memory no longer counts as per-sample under
multisampling. The coverage loop's memory-writes trigger goes: the loop stays for
`[[sample_id]]` and sample-qualified varyings beside `[[sample_mask]]`, and its refusals
(early fragment tests, attachments, the interpolation functions, discard, quad operations)
no longer reach a memory writer that reads neither. Such a function takes the plain form and
runs as many times per pixel as the device runs it. `GraphicsState::sample_shading`, the
`sampleRateShading` requirement in `multisample_features`, and validation's candidate read of
the field (graphics_pipeline.rs) go with it. consumer-uses.sh: `sample_shading` 0 hits (code)
over the consumer's development a48b3984af and 68 refs.
The new static note `PrecisionNote::DeviceFragmentRuns` goes on the fragment stage of a
pipeline of more than one sample whose function writes memory, recorded by the compile layer
beside `MultisamplePosition`. Its conformance code is
`metal2vulkan-degrade-device-fragment-runs`, and validation's table makes it `Unbounded`.
docs/API.md section 9 lists it, and section 10 adds the accepted difference: "Metal's GPUs
were measured to run a memory-writing fragment once per covered sample; documented Metal names
no count; here the count is the device's."
Why: documented Metal names no run count for a memory-writing fragment. MSL 5.5 makes a
function run per sample only for a sample-qualified input, `[[sample_id]]` or `[[color(m)]]`.
Vulkan without sample shading runs at least one invocation per fragment, and "Multiple
fragment shader invocations may be executed for the same fragment for any number of
implementation-dependent reasons" (vkspec 35.5). One form now covers both classes of guest:
the replay count of 36 streams found no multisampled memory-writing fragment. History: the old
runtime, deleted in
|
||
|
|
2628c03fb2 |
player: a Windows host's video surfaces through an NT handle (--video-handle opaque-win32)
The Windows plays of boot-idle-780m-1 stopped at frame 212, the stream's first video surface: "error newTextureWithDescriptor:iosurface:plane:: the device exports no DmaBuf" (60780). The video stand-in knew only the Unix routes, a dma-buf (the default) and an opaque fd, while the runtime exports a surface on Windows through an NT handle (ExportHandle::OpaqueWin32), and answers NoExport for a dma-buf there, correctly. VideoHandle gains OpaqueWin32 (`--video-handle opaque-win32`): the surface is exported as an NT handle at the opaque fd's layout, pitch multiple 4, start multiple 1, no rows below. The runtime lays both opaque handles alike, each plane's LINEAR image at the driver's own pitch (its guide, the surfaces' handles), and its own Windows surface tests make the surface at those multiples (tests/surface.rs: the NVIDIA row and BUSY_ROWS on Windows). command-replay and docs/REPLAY-STREAM.md name the route. Test: new_runtime::tests::each_video_handle_names_its_export_and_layout. |
||
|
|
f6da64ab5d |
Compare no raced lockstep word: the two lockstep cases keep their notices, two validation cases go
Under the identity domains the runtime gives the threads of a SIMD-group no order between barriers, and the planner ruled form A: no order, the static note SimdgroupAccessOrder announced, the order not rebuilt. The words the two lockstep kernels race on are therefore no observation of Metal's that the runtime owes. - conformance simdgroup-lockstep-divergent-loop and -until record no output leaf any more, and the case/output allowance that left it unchecked is gone. Both keep their status and notices sites, with the access-order and the device-reconvergence notice declarations; the divergent loop keeps its counts-half site (what no thread writes, which no order changes), compared exactly. The two recordings lose their output leaf (the 26 lines of it, the rest byte for byte as recorded). The lockstep model and the tests over the recorded words go with the leaf; the two stub tests now prove the cases announce under either note, compare no raced word, and still read a moved counts-half byte as divergent. - validation 129666ac and 4b74b854 (the two authored cases whose observation is a raced word) are deleted with their Metal and MoltenVK observations. authored-compile.tsv keeps their rows until development's re-bless. - docs/CONFORMANCE-COVERAGE.md regenerated: simdgroup_lockstep compares every field. Verified: the compile job named in the lane's report. |
||
|
|
b90e0565da |
The floor: from_queries refuses a push window below 256 bytes, the runtime's floor requires 8 fragment outputs, and runtime-floor replaces the profiles below it
What: Device::from_queries refuses a description whose maxPushConstantsSize is below the 256
bytes every stage's push window is lowered for, with a typed Unsupported{PushWindow} naming the
MaxPushConstantsSize limit (crates/metal2vulkan/src/device/derive.rs, the floor checks of
from_queries). The runtime's floor (metal2vulkan-runtime's floor list) requires
maxFragmentOutputAttachments >= 8. All 15 committed device profiles report 8, and so does every
matrix card.
The committed profile set keeps only devices at or above the floor:
- roadmap-2022 and lunarg-desktop-baseline-2023 are deleted;
- vk12-floor and swiftshader move to profiles/below-floor/, inputs of the from_queries refusal
test only;
- runtime-floor, derived from the runtime's floor by scripts/regen-device-profiles and held
equal to it by a test, is the floor every test compiles on.
A test of a below-floor form now runs on runtime-floor without the feature that form stands in
for, labelled "below the runtime's floor" (pipeline::testing::profile_without, PROFILE_F,
device_f, FORMATLESS_FLOOR). The validation tests name runtime-floor, or derive the device they
need from it (no tessellation, no formatless writes, robustImageAccess alone, no device
addresses).
Why: the runtime refuses every device below its floor, so translating for those profiles tested
forms no device the runtime opens can ask for. A push window below 256 bytes cannot hold what
the lowering puts there.
Consumer check: no public item of a published crate is deleted. The one removed constant,
FORMATLESS_FLOOR's old value, is in the crate-private pipeline::testing.
Not in this change, re-blessed on development: the golden hashes table
(tests::golden_hashes) and the public fixture expectations (tests::public_fixtures_engine). The
runtime-sources pin (candidate::engine::artifact) follows from the test run at this tree.
Verified: cargo fmt. The suites, clippy and the CPU-ICD run are potluck jobs on this tree, named
when the branch is handed over.
|