9027bd2aa3daa70ed265ce7164f7fcaac2a3bf3f
1955
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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.
|
||
|
|
75c9d080a3 |
YCbCr writes go: a function's writes to a 4:4:4 two-plane YCbCr texture are refused
Metal stores a function's writes to an unpacked 4:4:4 two-plane YCbCr texture into both its planes. The translator held such a slot through an R32G32B32A32_UINT write shadow (StorageImageClass::YCbCrWrite), and a heap's float storage class held such a member through an R32G32B32A32_SFLOAT view of its shadow, flagged in its handle-table entry (FLAG_YCBCR_WRITES). The consumer then encoded the shadow into the planes with bind::ycbcr_write_module. The same module's second mode stored a render pass's YCbCr attachment (FormatEmulation::YCbCrRendered) into the planes. metal2vulkan-runtime refuses every YCbCr texture (Gap::TextureFormat), so neither mode ever ran, but every heap write of a float or half texel through a 2D handle carried the flag's test and select under its own specialization constant. Now a slot that writes such a texture keeps the format's refusal (storage_choice, NotImplemented(Format)), as the other 4:4:4 formats' writes did, and a heap member of one has no storage choice, so the heap refuses it (ArgumentBufferTextures, NotImplemented). A heap write no longer tests the flag, and its handle-table search no longer carries it. FormatEmulation:: YCbCrRendered stays as the pipeline's form: a pipeline into such an attachment is made as before, so no new pipeline-state refusal appears. Its doc now says the pass's store into the planes is not implemented and that the runtime refuses such textures. Removed: - lowering: StorageImageClass::YCbCrWrite (slot.rs's write-only check, emit's ycbcr_write_texel and YCBCR_WRITE_WORDS), the heap mark (heap_ycbcr_mark, HEAP_YCBCR_WRITE_WORDS, Write::heap_ycbcr, lower::texture::heap_ycbcr_writes), AccessPlan::heap_ycbcr_writes, and the YCbCr element mask in heap_element_index. - memory::handles: FLAG_YCBCR_WRITES, HANDLE_YCBCR_WRITES, Lookup's ycbcr field in Flagged and Indexed, carries_ycbcr, ycbcr_writes_spec, ycbcr_flag_mask, ycbcr_element_mask, ycbcr_writes_set, k32_const, and Table's stage (only the YCbCr carry read it). carry takes the form alone. The search tests lose the YCbCr forms and a_search_carries_the_ycbcr_flag_only_under_its_constant. The test tables keep an unused bit 15. - pipeline: SpecKey::HeapYCbCrWrites; HeapStorageReads' doc loses the write shadow. - binder: plan/resources' write-shadow choice, bind::heap's shadow view, its entry flag and the reads_unmeasured case, plan::slots::heap_ycbcr_writes and its two specialization arms (compute and graphics). bind::ycbcr_write goes whole: ycbcr_write_module, YCbCrWriteModule, and the CPU models ycbcr_write and ycbcr_store, along with their tests. bind::ycbcr_convert loses words_buffer and scalar, which only the write module used. - metal::format: ycbcr_writes_stored. The YCbCr, YCbCrRendered, writes_dropped, ycbcr_renders and held_storage_choice docs say what holds now. - tests: engine_heap_ycbcr_writes, engine_extended_range's ycbcr_write_slots_store_each_texel_s_bits_and_mark, and engine_handles' word allowance for the mark (100 words). owned_divisions loses the write module; api_surface loses five rows. SEMANTICS_VERSION 2223 is in this commit (placeholder; main renumbers): every heap write of a float or half texel through a 2D handle loses the mark's code, and the plans of such slots change (a refusal). ARTIFACT_FORMAT_VERSION 566: SpecKey loses HeapYCbCrWrites in the codec. RUNTIME_VERSION 2545: bind::heap's handle-table entry flags lose bit 15. The runtime pin is updated. api_signatures is regenerated, and so is docs/REFUSALS.md (one site fewer for ArgumentBufferTextures and one for Format). Consumer check (consumer-uses.sh, consumer development 12b87d3d6b, 64 refs): YCbCrWriteModule, ycbcr_store, ycbcr_write, ycbcr_write_module, HeapYCbCrWrites, YCbCrWrite, FLAG_YCBCR_WRITES, WRITTEN_BINDING: 0 hits (code). ycbcr_writes_stored: 0 hits on development. It is used on 39 consumer lane branches (steelbrain/quiesce and others, the newest 17 hours old), in crates/reims-vgpu-vulkan/src/gpu/ycbcr/sampling.rs:2527, a test of the old runtime's YCbCr write path. That directory is not on the consumer's development. Verified: nothing yet (a check job is owed). |
||
|
|
1fc878dc12 |
player: count every creation it does not attempt, by selector, reason and root
A call that makes an object on a skipped receiver, or naming a skipped object, made its result skipped without a line: such a pipeline state counted only in skipped_objects or skipped_calls, so a stream's 494 render pipeline states against the play's 493 passed unseen. Each such creation is now counted by its selector and reason (its receiver is skipped, or it names a skipped object), the reason naming the selector that made the chain's first object skipped; each skipped object keeps that root, inherited along the chain and removed at release. The report prints a `not attempted SELECTOR N: WHY, the first #ID (its root #ROOT)` line for each, the counter `not_attempted`, and a line that adds up the pipeline states: render states made, refused and not attempted, and the compute states the same. The existing counts are unchanged. Test: new_runtime::tests::creations_not_attempted_are_counted_by_kind_and_root (a library from source skipped, a function of it, two render states of that function, one refused state). |
||
|
|
f7279104ae |
Emulated meshes go: a device without VK_EXT_mesh_shader refuses mesh and object functions
The planner's ruling: a mesh render pipeline is native or refused. With VK_EXT_mesh_shader and
meshShader (taskShader for an object function), the stages are task and mesh shaders, as before.
The emulation was a second form for devices without them: the object and mesh functions ran as
compute entries, which wrote each threadgroup's vertices and primitives as records into a
per-draw buffer or the command buffer's records pool, and a synthesized vertex stage drew those
records. The runtime never takes that path. Now a mesh or object function on such a device is
refused at lowering (Unsupported{MeshShading}, needing VK_EXT_mesh_shader and the stage's feature
where the profile lacks them), and so is its pipeline. The command line compiles no mesh pipeline
and answers FALLBACK for a mesh or object function on every device, as before.
Removed:
- lowering: lower/mesh/work.rs (the work buffer layout), lower::mesh::emulates, the emulated
compute entries and their wrappers, the record stores, Layout/layout/records/emulated_payload,
the RECORDS/WORK/OBJECT_* slots; MeshPlan's emulated and payload_words. Also dispatch.rs's
WrapperGroups and the wrapper_groups field, emit's GLCompute arm for meshes,
stage_io::flat_primitive_inputs, and the requirement trace's record writes. The payload is
always TaskPayloadWorkgroupEXT (memory::arena::declare_payload). lower::mesh::mesh_stages states
the native test that folds_object_grids reads. The mesh builtins are a const.
- pipeline: MeshRecords, RecordField, RecordValue; GraphicsState::mesh_records and mesh_corners;
StageInterface's mesh_records, mesh_corners and emulated_payload (vk_stage loses its COMPUTE
arm); the synthesized vertex stage (link::mesh keeps the payload check) and link's record
slots and push-range hull; SyntheticBinding::MeshRecords and MeshWork;
RuntimeFact::MeshLastFirst; VariantKey::mesh_last_first. Varyings hold mesh outputs to
maxMeshOutputComponents only. The link contract's compute-entry records check goes, and
compile/api's mesh_info reads the task and mesh limits only.
- binder: bind/mesh_scan (mesh_scan_module, mesh_object_arguments_module, MeshScanModule; its
div_ceil and for_range move to mesh_arguments, their one other reader), MeshDispatch,
MeshGroups, MeshRecordsRegion, DrawCommands::mesh_dispatch, MeshTemplate::records and
RecordsTemplate, GroupStage::Compute (GroupLimits.total is a plain u32), the emulated mesh
stage flags, BindState and BindShape's mesh_last_first, WriteSource::MeshRecords and MeshWork,
and DrawReplayRule::DispatchesFirst. Status: StatusBits::MESH_RECORDS_OVERFLOW,
StatusReport::mesh_records_overflow, MeshRecordsFault, and the words MeshRecordsCursor and
MeshFault{Draw,Objects,Groups}. The buffer keeps its 32 bytes, with SeqCstFences at word 7:
words 3 to 6 are not written, and bit 5 is unreported.
- runtime: the synthesized-stage test no longer reads mesh_records; the SynthesizedStages doc
loses "mesh records".
- tests: engine_mesh's emulated tests (the compute entries, the records pipeline and its object
draws, the last-first variant) are replaced by two refusal tests, one per function and one per
pipeline. The tests that also ran the emulating profiles run the profiles with the extension.
engine_mesh_barriers loses its interpreter run of the emulated object entries; the
round-trip, link and module-sweep fixtures and api_surface lose the rows.
- validation: build.rs's runtime inputs lose lower/mesh/work.rs; a companion test's comment.
The 15 authored mesh and object cases stay untouched. The authored compile census is
re-blessed on development.
Docs: API.md's mesh section states the refusal and loses the emulation's paragraphs, and two
lists lose "an emulated object or mesh function". Varyings docs lose a stale emulated
post-tessellation mention. docs/REFUSALS.md and api_signatures are regenerated. README and the
command's help name no mesh pipeline and need no change.
SEMANTICS_VERSION 2221 is in this commit (placeholder; main renumbers): what the translator emits
for a mesh or object function on a device without the extension changes (a refusal), and the
mesh draws' plans change. ARTIFACT_FORMAT_VERSION 565: the codec loses MeshRecords,
RecordField, RecordValue, StageInterface's three fields, GraphicsState's two, two
SyntheticBinding variants and RuntimeFact::MeshLastFirst. RUNTIME_VERSION stays at this series'
2543. The runtime pin is updated.
Consumer check (consumer-uses.sh, consumer development 12b87d3d6b, 70 refs):
MeshDispatch: 0 hits (code); link-order lists only.
MeshGroups, MeshRecordsRegion, mesh_scan_module, mesh_object_arguments_module, MeshScanModule,
MeshRecordsFault, mesh_dispatch, MESH_RECORDS_OVERFLOW, MeshRecordsCursor, MeshFaultDraw,
MeshFaultObjects, MeshFaultGroups, DispatchesFirst, mesh_last_first, MeshRecords, RecordValue,
mesh_records, mesh_corners, emulated_payload, MeshWork, MeshLastFirst, POOL_WORDS, DRAW_OFFSET,
DISPATCH_OFFSET: 0 hits (code).
mesh_records_overflow: 0 hits on development. It is used on consumer lane branches
(steelbrain/quiesce and others), but only as the name of a local function in
reims-vgpu-vulkan/src/gpu/command.rs, which answers the old runtime's
CommandBufferError::MeshRecordsOverflow. It does not read this field.
Verified: nothing yet (a check job is owed).
|
||
|
|
b14c6a7101 |
Emulated tessellation goes: a device without tessellationShader refuses the function
The runtime's floor requires tessellationShader, so on every device the runtime opens a
post-tessellation vertex function runs through the device's tessellation stages. The emulation
was a second form: it ran the function as a plain vertex stage that drew Metal's tessellator's
triangles itself, from the draw's records, which a compute scan wrote before each patch draw. Now a
device without tessellationShader refuses the function (Unsupported{Tessellation}, needing
VkFeature::TessellationShader), and the command line answers FALLBACK there.
Removed:
- lowering: lower/tessellation/{emulated,tessellator,work}.rs, wrap_entry, Emulation, emulates;
EvalPlan's base_instance and emulated; Declared's emulated globals; the emulated
[[base_instance]] source; PushField::TessellationChunk; stage_io::primitive_id_varying.
- pipeline: EmulatedTessellation, GraphicsState::emulated_tessellation, TessellationStage::emulated,
LoweringInputs::tessellation (and InputsFrom::Vertex's tessellation field and its key bytes),
link's emulated_state, RuntimeInput::TessellationDescriptor, SyntheticBinding::TessellationWork
and TessellationRecords; primitive_id_carried_on is primitive_id_varying_on again.
- binder: bind/tessellation_scan (tessellation_scan_module, TessellationScanKernel,
TessellationScanModule), TessellationDispatch, TessellationRecords,
DrawCommands::tessellation_dispatch, WriteSource::TessellationWork and TessellationRecords,
StatusBits::TESSELLATION_RECORDS_OVERFLOW and RECORDS_FAULTS, StatusReport's
tessellation_records_overflow and TessellationRecordsFault. FactorTemplate keeps only the
control stage: FactorSite goes, and its fields are push_offset and factor_binding, with the
patch index binding always present. The mesh scan's first-fault test reads its own bit. Bit 8
of the status word is unreported.
- tests: tests/tessellator (the emulated tessellator against its model), the emulated tests in
engine_tessellation (now asserting the refusal on profiles without the feature), the emulated
fixtures in api_tests and graphics tests, owned_divisions' scan sweep, and api_surface rows.
The key test keeps its native half: a vertex function's key is the same for every
tessellation state.
- validation: build.rs's runtime inputs lose tessellator.rs and work.rs (factors.rs stays: the
binder sizes factor ranges by factor_bytes). The acceptance and coverage tests expect the typed
refusal on roadmap-2022, vk12-floor and swiftshader.
Docs: README and the command's help say a post-tessellation function needs tessellationShader;
API.md's tessellation section states the refusal; the two tessellation precision notes no longer
mention the emulation; docs/REFUSALS.md and api_signatures regenerated (Tessellation now names
VkFeature::TessellationShader instead of MaxStorageBufferRange).
SEMANTICS_VERSION 2220 is in this commit (placeholder; main renumbers): what the translator emits
for a post-tessellation function on a device without tessellationShader changes (a refusal), and
the vertex key loses the tessellation state. ARTIFACT_FORMAT_VERSION 564: the codec loses
EmulatedTessellation, TessellationStage::emulated and three enum variants. RUNTIME_VERSION stays
at this series' 2543. The runtime pin is updated.
Consumer check (consumer-uses.sh):
consumer: development 7ea4edc2fb; 72 refs (development + steelbrain/* younger than a day)
TessellationDispatch: 0 hits (code); link-order lists only
TessellationRecords, TessellationRecordsFault, tessellation_scan_module, TessellationScanKernel,
TessellationScanModule, TESSELLATION_RECORDS_OVERFLOW, RECORDS_FAULTS, tessellation_dispatch,
TessellationWork, EmulatedTessellation, emulated_tessellation, TessellationChunk,
RuntimeInput::TessellationDescriptor, scan_kernel, max_patch_triangles, wrap_entry, FactorSite:
0 hits (code)
tessellation_records_overflow: 0 hits on development. It is USED on consumer lane branches
(steelbrain/quiesce and others), but only as the name of a local function in
reims-vgpu-vulkan/src/gpu/command.rs, which answers the old runtime's
CommandBufferError::TessellationRecordsOverflow. It does not read this field, and this tree's
runtime has no such error.
Verified: nothing yet (a compile job is owed).
|
||
|
|
158d918e91 |
Flat dispatch goes: a flat or folded variant's indirect dispatch outside a device replay
flat_dispatch_module read an indirect Metal dispatch's arguments on the device and wrote the
record and VkDispatchIndirectCommand a flat (or folded) variant then ran at, for a dispatch
outside the device replay. The runtime never takes a binding plan, and no consumer records the
module. The plan now builds a flat variant's direct Threads dispatch alone (its record is
DispatchCommands::region_record, as before); its indirect dispatch, and any dispatch of a folded
variant, whose records only the device replay's preprocess writes, is
Unsupported{GpuEncodedIndirectCommands, NotImplemented}, already the answer for the variant's
other forms. The device replay keeps its flat and folded variants and flat_dispatch, the
derivation its preprocess shares.
Removed: bind/replay/flat.rs (flat_dispatch_module, FlatDispatchModule, FlatIndirect,
FlatArguments), its tests, and the folded variant's read_records in instantiate_dispatch_into;
the dispatch test now asserts the flat variant's indirect dispatch is refused; the replay
modules' overflow test reads the preprocess alone (its want of 26 already counted the shared
derivation's 23). Records' docs say what they hold now (the Binder doc lost its clamp too).
RUNTIME_VERSION stays at this series' 2543 (the plan's answers change); runtime-sources
re-pinned, api_signatures and REFUSALS.md regenerated.
Consumer check (consumer-uses.sh):
consumer: development 7ea4edc2fb; 68 refs (development + steelbrain/* younger than a day)
flat_dispatch_module: 0 hits (code)
FlatIndirect: 0 hits (code)
FlatArguments: 0 hits (code)
FlatDispatchModule: 0 hits (code)
Verified: nothing yet (compile check owed).
|
||
|
|
53e1535ee3 |
Indirect clamp goes: an indirect dispatch reads Metal's group counts from its buffer
The runtime reads an indirect dispatch's group counts where Metal wrote them (its README: a count above maxComputeWorkGroupCount is the GPU's to read, which Vulkan leaves undefined), and its path never takes a binding plan's clamp prepass. The plan now does the same: an indirect region reads IndirectArgs::Buffer on every device, its use is the 12 argument bytes vkCmdDispatchIndirect reads in DRAW_INDIRECT, and IndirectGroupCount's mechanism is None. Removed: bind/indirect_clamp.rs and its tests (IndirectClamp, IndirectClampModule, indirect_clamp_module), DispatchCommands::indirect_clamp, IndirectArgs::ClampScratch, the template's storage_alignment, Mechanism::IndirectClamp, StatusBits::OVERFLOW (bit 0 stays unused) and StatusReport::overflow. The validation executors lose their clamp checks (compute.rs, replay.rs, device_replay.rs), which valexec confirmed only refused the clamp, and the engine's overflow verdict. The engine_binder harness runs an indirect dispatch from its buffer at counts within the test device's limit. ARTIFACT_FORMAT_VERSION 563 (Mechanism's codec list loses a variant), RUNTIME_VERSION 2543 (the dispatch plan's indirect region and uses change), runtime-sources re-pinned, api_signatures and REFUSALS.md regenerated. Consumer check (consumer-uses.sh): consumer: development e6414dd601; 70 refs (development + steelbrain/* younger than a day) IndirectClamp: 0 hits (code) IndirectClampModule: 0 hits (code) indirect_clamp_module: 0 hits (code) ClampScratch: 0 hits (code) indirect_clamp: 0 hits (code) OVERFLOW: 0 hits (code) StatusReport: 0 hits (code) StatusBits: 0 hits (code) SEMANTICS_VERSION 2219 is in this commit too: the artifact records IndirectGroupCount's mechanism, which moves from IndirectClamp to None (the planner's rule: an emitting commit carries its own bump); main renumbers it at the landing. Verified: nothing yet (compile check owed). |
||
|
|
193a9a6e95 |
Builders, batch 3: the resolve draws, the visibility combine and the texture shadow's modules go
color_resolve.rs (color_resolve_modules and its format, channel, rule and source types), depth_stencil_resolve.rs (depth_stencil_resolve_modules, DepthPick, ResolveWrite and the draw types), visibility_combine.rs (visibility_combine_module, VisibilityCombine, ContinuedResult) and the texture shadow's four files (shadow_merge_module, shadow_merge_image_module, shadow_merge_kept_image_module, shadow_copy_back_module, shadow_copy_in_module and their types): no non-test code outside them names any of their items (the runtime, the harness, validation and conformance included; test items stripped one by one, wherever they lie), and no plan, variant key or lowering input asks a consumer to run them. They go with their tests, re-exports, api_surface rows and owned_divisions builds. Metal's sRGB resolve tables (SRGB_RESOLVE_LINEAR, SRGB_RESOLVE_THRESHOLDS) move into the tile test, their one reader, as private constants with their measured docs. depth_stencil_copy's binding map loses the resolve draws' arm. bind's module map, metal/format/word.rs and the msaa_word_formats probe's note no longer name the resolve. The runtime-sources table drops lower/arith/extended_range.rs, which only the color resolve reached, and its SPIR-V builder row no longer names the visibility resolve. No run or translation changes (nothing called them): the versions stay; api_signatures, REFUSALS.md and the runtime pin are regenerated. Consumer check: ~/.cache/m2v-orch/consumer-uses.sh, consumer: development b7929d6936; 73 refs (development + steelbrain/* younger than a day), 0 hits for color_resolve_modules ColorResolveFormat ColorResolveModules ResolveChannel ResolveRule ResolveSource SRGB_RESOLVE_LINEAR SRGB_RESOLVE_THRESHOLDS depth_stencil_resolve_modules DepthPick DepthStencilResolveDraw DepthStencilResolveModules ResolveWrite visibility_combine_module ContinuedResult VisibilityCombine VisibilityCombineModule shadow_copy_back_module ShadowCopyBackModule ShadowTexelView shadow_copy_in_module ShadowCopyInModule shadow_merge_module ShadowMergeModule ShadowMergeStores shadow_merge_image_module shadow_merge_kept_image_module ShadowMergeImageModule ShadowMergeRead (ColorResolveFormat, ResolveSource and DepthPick appear in link-order lists only). |
||
|
|
46cd581525 |
Builders, batch 1: thirteen bind files no code names go with their tests
dynamic_views, extended_canonical, extended_shadow, icb_reset, pages_copy, plane_bytes_copy, plane_copy, plane_words, rotate_texels, rows_copy, tiled_texels, ycbcr_refresh and ycbcr_sample: no non-test code outside each file names any of its public items (the runtime, the harness, validation and conformance included), so each file goes whole, with its tests, its re-exports, its api_surface rows and its owned_divisions builds. The docs that named them say what is true now: bind's module map, the depth clamp's tiled-texel note, the written-flag docs (a consumer may reset only the flagged records), the input shadow's runtime file, conformance's two-plane note. The runtime-sources row of lower/arith/extended_range.rs names the color resolve, which still reaches it, in place of the deleted half-shadow load. No behaviour of a run or a translation changes (nothing called them), so neither RUNTIME_VERSION nor SEMANTICS_VERSION moves; api_signatures, REFUSALS.md and the runtime pin are regenerated. Consumer check: ~/.cache/m2v-orch/consumer-uses.sh, consumer: development 62b3227c74; 67 refs (development + steelbrain/* younger than a day), 0 hits for DynamicViewsModule dynamic_views_module ExtendedShadowModule extended_shadow_module IcbResetModule icb_reset_module PagesCopyModule PagesCopy pages_copy_module PlaneWordsModule plane_words_module RotateTexelsModule rotate_texels_module RowsCopyModule rows_copy_module TiledTexelsModule TiledLevelMove tiled_texels_module YCbCrRefreshModule ycbcr_refresh_module YCbCrSampleModule ycbcr_sample_module; consumer: development 62b3227c74; 68 refs, 0 hits for ExtendedCanonicalModule extended_canonical_module extended_range_canonical PlaneBytesCopyModule plane_bytes_copy_module PlaneBytes PlaneSource PlaneCopyModule plane_copy_module. PlaneRows: its hits are the consumer's own `struct PlaneRows` (reims-vgpu-video's vaapi/va/frame.rs:333, re-exported from vaapi.rs), none of them ours. |
||
|
|
13dc7d47fc |
DriverWorkaround goes: its two every-device variants are the static notes they named
Every profile took both variants (Device::from_queries listed ClippedCoverageNotMetals and TessellatorNotMetals for every device, since no query tells Apple's rasterizer or tessellator apart), so the enum, ProfileFields::workarounds and DeviceProfile::workarounds() carried no choice. The two notes are recorded unconditionally where the workarounds gated them: PrecisionNote::ClippedCoverageSplit for a multisampled read of the coverage or a centroid varying at the pixel (lower::fragment::coverage), and PrecisionNote::TessellationTriangleOrder on every tessellation evaluation stage (link::tessellation::note_evaluation_stage, which no longer takes the profile). The notes' docs, derive.rs's and API.md's say every device records them because no query tells Apple's apart. The tests that asserted the list go; validation's identity test compares the two drivers' profile fingerprints instead. api_signatures.tsv is regenerated (four rows go); REFUSALS.md unchanged; the api_surface row goes; the runtime sources' pin follows. Emitted code is unchanged; the profile's fingerprint moves with its fields. Consumer check: ~/.cache/m2v-orch/consumer-uses.sh at reims development 62b3227c74, 66 refs (development + steelbrain/* younger than a day). DriverWorkaround: 0 hits (code). ClippedCoverageNotMetals: 0 hits (code). TessellatorNotMetals: 0 hits (code). note_evaluation_stage: 0 hits (code). A fixed-string grep for `.workarounds()` over the same 66 refs finds 0. Verified: nothing yet; the gate follows. SEMANTICS_VERSION 2218 is in this commit: the two variants become static precision notes and the profile loses its workaround list, so notes and keys move (the planner's rule: an emitting commit carries its own bump); main renumbers it at the landing. |
||
|
|
f6b9aa2a3d |
docs: CONFORMANCE-COVERAGE.md re-derived for the line ties' ledger rows
python3 -I scripts/conformance-coverage/coverage.py at this branch: the ledger's count goes from 7478 to 7490, and the twelve primitive-type-restart-indices rows join its table. |
||
|
|
107dba0b33 |
runtime: lines by Bresenham's rule, bresenhamLines on the floor
Metal covers the pixels whose diamond a line exits. Vulkan's default line rule is the device's own: on a device whose strictLines is set (lavapipe, NVIDIA's driver), the rectangle of the line's width. The new runtime chained no line state, so primitive-type-restart-indices' four Line and LineStrip cells differed from Metal on lavapipe (m3-max-60347) and on the RTX 2080, 3090 and 5080 (round |
||
|
|
83ca8337dc |
Fix forward of 74080bbaed: the lockstep cases declare the access-order notice; the landing numbers
- The simdgroup_lockstep cases also loosen the notices site by simdgroup-access-order (replay::notice_allowance). The site holds the whole announced set, and the walk loosens it only where an allowance covers it, so the output's allowance alone left that site divergent. The stub test the_lockstep_cases_justify_their_words_by_the_access_order_note failed on exactly that (m3-max-60440). - SEMANTICS_VERSION 2217 and ARTIFACT_FORMAT_VERSION 560, the numbers main gave for this landing. - docs/CONFORMANCE-COVERAGE.md re-derived: the case's tolerance is now a Degradation. |
||
|
|
fd7e029718 |
translator: a kernel whose lockstep pairs the identity domains leave unordered records SimdgroupAccessOrder
Under the identity domains (the runtime's) the translator puts no barrier between two accesses that different threads of one SIMD-group make to the same bytes between barriers, which an Apple GPU orders by running the group in lockstep. The Metal Shading Language calls such a pair a data race, and docs/API.md lists the difference as accepted. Until now that difference was silent. Two private validation kernels through the runtime on lavapipe (129666ac, 4b74b854) mismatched for this reason alone. The same translation with the lockstep order put back (probe 61461f3a67, not landed) matched Metal byte for byte in both (job m3-max-60389). - PrecisionNote::SimdgroupAccessOrder, a static note that names the Metal behaviour. It is recorded for every kernel in which the translator finds such a pair, on every device under the identity domains. The resident-table domains order each pair with barriers and record none. - lower/simd/lockstep.rs: OrderKey::of gives every profile a key. Under the identity domains the key orders nothing (unordered): order() runs the pair search alone, stops at the first space with a pair, inserts no barrier and sets Lockstep::unordered. select records the note from it. ordered_entry loses its None arms. The found entry is kept under its key in StageEntries, as an ordered one is. - Announced as metal2vulkan-degrade-simdgroup-access-order (the conformance Degradation kind). docs/API.md's catalogue entry is placed beside the accepted difference, which now names the note. The conformance simdgroup_lockstep cases justify their output words by that notice, so the runtime's side does not announce it undeclared. Validation derives no tolerance from it (Allowance::Unbounded). - SEMANTICS_VERSION 2212 -> 2213 and ARTIFACT_FORMAT_VERSION 557 -> 558 (the appended codec variant); renumbered at landing. api_signatures.tsv regenerated (the variant twice and Lockstep.unordered). docs/REFUSALS.md does not move. Tests: the identity-domains lockstep test now asserts that each row-store kernel records the note under the identity domains and not under the resident ones. A new pair-free kernel (each thread its own word) records it under neither. A conformance stub test checks that a changed output word, with the notice announced, reads announced. |
||
|
|
ab6717c5b2 |
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. |
||
|
|
3653240b57 |
runtime: a point-size function's state is refused under the line and triangle class
Metal's pipeline creation fails for a vertex function that writes `[[point_size]]` under the line
or the triangle input primitive topology class ("Vertex shader writes point size but
inputPrimitiveTopology is MTLPrimitiveTopologyClassLine", measured on an M3 Max, macOS 27.0.1,
the conformance crate's topology_classes probe), and makes it under the point and the
unspecified class. The runtime made all four, so the round's
topology-class-point-size-function on the RX 7900 XTX recorded render-pipeline:line and
:triangle true where Metal recorded false, and drew lines and triangles Metal never drew
(drawn:, target:line and :triangle).
RenderCompiled::of now refuses such a state with the new
Refusal::PointSizeTopology { class }, read from the translator's graphics.writes_point_size and
the descriptor's class, before any Vulkan object is made. The descriptor key already covers the
class, so a cached content of another class never answers for it.
The ledger's row for the case's drawn:unspecified refusal ("a draw with Points is not built") is
stale: points are drawn now, and the round reports it no longer refuses. Dropped.
The runtime README's point bullet states the refusal and the 1.0 stored for a size not greater
than 0 (the previous point-size commit); docs/REFUSALS.md regenerated and the api_signatures
table blessed (one variant row).
Test: draw's every_device_refuses_a_point_size_function_under_the_line_and_triangle_class
(`draw_point_size_class`): rt6_point's state is refused with the class under Line and Triangle and
made under Unspecified and Point.
|
||
|
|
e8bcb0c317 |
API.md: recommended_enables takes no policy since the policy arms went
Verified: docs only; the call matches enables.rs's signature. |
||
|
|
ba63cf58ca |
Policy arms: the enables tests import DevicePolicy themselves (clippy 59962); docs name what is bounded
The enables module no longer names DevicePolicy, so its tests import it. API.md and VALIDATION.md say the default domains' bounds, and an unbounded threadgroup access, instead of containment and isolation. api_signatures.tsv is regenerated (signatures.py --bless); REFUSALS.md is unchanged. Verified: clippy follows as a potluck job. |
||
|
|
313c94e52c |
Policy arms, part 3: the API guide says what is bounded, not that a guest is contained or isolated
Verified: nothing yet; clippy and doc follow. |
||
|
|
f473ccdb72 |
runtime: a pass resolves into a colour texture of any usage, as Metal does
Metal resolves into a texture of any usage. Probe resolve_texture_usage.m (M3 Max, macOS 27.0.1, job m3-max-59768) showed this, and a guest's walk met it twice: a map view's 900x900 pass resolves a 4-sample BGRA8Unorm_sRGB colour, beside a 4-sample Depth32Float_Stencil8 and with every load Load, into a 1-sample BGRA8Unorm_sRGB Shared texture of ShaderRead usage. The runtime refused that as RenderPassKind::ResolveUsage and skipped the pass, so the view missed its drawing. Form A, as ruled: every one-sample colour texture (2D, 2D array or cube) whose image is optimal now takes the colour attachment usage on every device where its format renders, whatever Metal's usage. A pass resolves into it by Vulkan's own resolve, as into a render target. - texture.rs plan() sets Plan::resolves for a one-sample colour texture of those types made without the attachment usage, where the format's features hold the attachment (plan.supported). The optimal image's format query runs with the usage. Where it refuses the image or the image does not fit the texture's samples, extent and layers, the image is made without the usage. Plan::image_usage gives image_info and the texture's Image the usage. Such a texture is no render target: it takes no feedback usage or shadow for attachment reads, and a pass that renders into it is still Refusal::AttachmentUsage. - A linear image in place over a buffer (linear_usage, check_over, linear_layout, the plane checks) is unchanged. It takes no attachment usage for a resolve alone, so it stays in place and is never copied to gain one, and a resolve into it stays ResolveUsage. A texture over a buffer in its own optimal image (the counted copy) takes the usage like any optimal image, and the pass's write of it is copied back as a render target's is. - pass.rs resolve() reads the image's own usage (TextureObject::resolve_attachment) in place of Metal's. ResolveUsage remains for an image with no attachment usage: a depth or stencil texture (macgaps measured no depth format), a colour texture of another type or of a format the device's optimal image does not render, and a linear image in place. Memory: macgaps' table (jobs m3-max-59774, m3-max-59775, m3-max-59776) shows the worst pair on the Radeon 780M (RADV): a 1920x1080 one-level RGBA8Unorm image grows from 8,847,360 to 8,896,512 bytes (1.0056). On the RX 550 the same image reaches 8,882,200. The Iris Xe, RTX 3090, llvmpipe and KosmicKrisp show no growth. Docs: RenderPassKind::ResolveUsage, resolve_texture's doc and the runtime README's resolve paragraph and known gap say what is true now. docs/REFUSALS.md regenerated (the attachment view's function is now attachment_view). No public signature moved. Tests (lavapipe): every_device_resolves_into_a_texture_of_shader_read_usage is the probe's case. A 4-sample BGRA8Unorm_sRGB attachment cleared to (0.25, 0.5, 0.75, 1) is resolved into a 1-sample Shared texture of ShaderRead usage, and of ShaderRead | ShaderWrite. The image has the attachment usage, Metrics::resolves rises by one, and every texel reads the clear colour within one code. A depth resolve into a ShaderRead Depth32Float texture is ResolveUsage. A ShaderRead texture over a Shared buffer in place has no attachment usage, and a resolve into it is ResolveUsage. every_device_resolves_a_loaded_pass_beside_depth_and_stencil_into_a_shader_read_texture is the walk's shape: 900x900, colour beside a 4-sample Depth32Float_Stencil8, every load Load, resolving what an earlier pass cleared. The old check that ShaderRead and ShaderRead | ShaderWrite resolves are ResolveUsage is gone, since both now resolve. |
||
|
|
569b32b49a |
RuntimeDriverDefect goes: an identity-keyed table no runtime code reads
The enum listed 33 defects of named drivers in commands a runtime records, keyed on the driver's
identity and release (rule 2). The runtime constructs none and reads none: no crate of ours, and
none of reims's, names a variant. With it go Needs::RuntimeDriverDefect,
Unsupported::runtime_driver_defect, validation's UnsupportedReason::DriverDefect ("driver_defect"
keys; the stale census rows that carry one go at the next re-bless), the conformance verdict's
device-gap arm, the error and engine key tests' entries, the API guide's Needs entry and the
refusal surface script's constructor.
Since nothing reads a variant, no ladder rung follows from one: no site becomes a precision note or
a typed gap. The four docs that cited a variant now state what Vulkan or the module does without
it: the depth/stencil copy modules (maintenance8's copies), the generated-commands replay (the
explicit preprocess form, which the runtime does not take), the validation executor's set-layout
query note (MoltenVK's understated answer), the pipeline-cache probe's comments (MoltenVK compiles
a seeded cache's shaders at load), and SeparateMultisampledDepthStencil's refusal (maintenance8
alone).
NativeHalfConversion's bound adds NVIDIA 620.70.06's measurement on the RTX 3090: the pair is
dropped under the 16-bit RTE, DenormPreserve and SignedZeroInfNanPreserve too, every float that is
no half coming back unchanged over all 2^32 inputs. The bound already covered no rounding at all.
REFUSALS.md and api_signatures.tsv regenerated.
Verified: nothing yet; the gate follows.
|
||
|
|
6750bb3c74 |
validation: run plain kernel cases through the runtime's public API
The engine candidate's Vulkan executor runs a kernel case of buffers (device buffer arrays included), threadgroup memory, function constants and linked functions, dispatched by threads or threadgroups and observing a buffer, through metal2vulkan-runtime as a consumer runs it (engine::runs_through_runtime decides it from the case's structure; platform::execute_runtime runs it): Instance, the loader's first device of the kind, Device with the default options, the library and function from the row's AIR with the case's constants and linked functions, one compute pipeline state, one Shared buffer per binding as the oracle makes it (a bound buffer padded to its declared size), one compute encoder, one dispatch, the bounded wait and the readback. Only on the native backend, in the stated leg and without a profile restriction; every other case keeps the executor's own context until its family's landing. The device worker enables VK_LAYER_KHRONOS_validation for the run through the loader's and the layer's variables (core and synchronization validation, every message, one log per process); a device with no active validation tool fails the run, and so does any logged message. The pipeline state's make is held to 500 MiB of peak live allocations (worker::alloc::bounded: an allocation past it ends the process with exit 87 and a stderr line) and 20 s; the driver's creation to the case's bound; every pipeline is made before the submission (prepare_dispatch). The row keeps what the runtime answers: the state's precision notes and the runtime fingerprint (engine::runtime_fingerprint: the product, SEMANTICS_VERSION and the runtime crate's sources, METAL2VULKAN_RUNTIME_CRATE_FINGERPRINT from build.rs). spv_sha256, the status, the census module's subgroup shape, containment and artifact are absent (Option, serde default); the index's staleness accepts the runtime fingerprint as this build's. ReductionOrder: the comparison keeps the note's per-operation allowance. The census strategies of a runtime row are the simdgroup float sums and products the case's AIR calls (check::interface::float_reductions, from the entry's module and each linked module), under the names the translator's strategy census gives them, so ComparisonClass::derive bounds the same operations with the same reorder table as before; a note no such operation explains (a simdgroup matrix's) stays unbounded, as before. ENGINE_EXECUTOR_ABI v185: rows of these cases record another environment and census. |
||
|
|
88a5a8d641 |
matrix: the golden table and the runtime without the old-runtime wording
The golden hash table compiles through Device::from_queries (docs/ VALIDATION.md already says so), not Device::new, so the matrix's comments and its problem message say that. The gate keeps its behaviour under its own name: results.golden_table_moved (was old_path_moved), GOLDEN_FIX (was OLD_PATH_FIX), and the leg's problem "GOLDEN TABLE MOVED" (was "OLD PATH MOVED"), with VALIDATION.md's line and the test following. The "new runtime" of results.py's and instructions.tsv's comments is now the runtime. Unchanged, because readers depend on them: the exemption phrase "old-runtime regression fix" (matched in the subjects of commits since the table's last bless), and the record keys harness-new/, harness-new-warm/, harness-gpu-new/ and harness-alone/<row>/<pair>/new, which the harness prints from its --runtime value and which the 60 stored notes under refs/notes/matrix hold: a base's records are compared key by key, so renamed keys would compare nothing against every stored base. |
||
|
|
7be3a0326b |
Restore ArgumentBufferLayout::from_descriptors: the consumer's newArgumentEncoderWithArguments: layout
The orphan pass (
|
||
|
|
82abe62334 |
Fix forward: the API signature table and REFUSALS.md at the dead-variant batch's landing over the orphans
The dead-variant batch (cutxlate-dw) and the translator orphans (cutcheck) deleted items on both sides: the orphans removed CompensatedViewport, is_permanent_for and the ViewportCompensation path; the batch removed the offset-0 class (ZERO_OFFSET_CLASS, ZERO_OFFSET_TOLD, storage_view_buffers), Needs::DriverDefect and the dead DriverWorkaround variants. The landing's rebase kept both deletions, so the generated tables are regenerated from the merged sources: scripts/api-signatures/signatures.py --bless and scripts/refusal-surface/refusal_surface.py. Verified: both scripts ran on the merged tree; the table holds no ZERO_OFFSET row. |