14c37cc76d97467b4ab896cd367cb4c080f404f8
321
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7fcd661645 |
Validation cases: Metal's answer for mul24 and mad24 in and outside their 24-bit range (red)
Two authored cases over engine/int24_products, 12 threads, out filled with 0xAB: operands in the range the Metal Shading Language specification gives mul24 (section 6.4, after Table 6.2: [0, 2^24 - 1] unsigned, [-2^23, 2^23 - 1] signed), and operands outside it, each beside small in-range partners, where the specification calls the product implementation-defined. The addends are full 32-bit words in both. Installed with corpus-case-check (m3-max-82243) and qualified on Metal on the Apple M3 Max, three executions each (m3-max-82247). Metal's outputs against the kernel computed on the CPU, word for word (480 words each): - in range: equal to the 32-bit product of the operands, and equal to the product of their low 24 bits (zero-extended unsigned, sign-extended signed), which agree there; - outside the range: equal to the product of the operands' low 24 bits at all 480 words; the 32-bit product of the whole operands differs at 386 of them. scripts/qualify-public-cases runs both on lavapipe against those rows. They are red until the family is lowered: today the translator refuses the kernel as UnknownIntrinsic. |
||
|
|
39423d92f1 |
ICB: a kernel's indexed patch draws into an indirect command buffer, executed through a layout of indexed patch draws
The owner's 3406 order, the planner's next indirect command kind: MTLIndirectCommandTypeDrawIndexedPatches. The records (pipeline::IndirectDrawLayout) grow by 8 bytes a command for every kind. The control-point indices' address is a third u64 that an execution pushes, and VUID 11103 asks each token's offset to be at or past the one before it, with the draw token last (VUID 11100). So the address cannot go after the draw; it lies past the index token's 16 bytes, at index() + 16. Every command's tail is now 16 + 8 + 4 + 20 = 48 bytes: the stride is index() + 48 (was + 40), the sequence index's place index() + 24 (was + 16), and the draw's arguments index() + 28 (the translator's DRAW_AT, was 20). The cost is 8 bytes a command in every buffer: 160 bytes for 7 vertex and 7 fragment slots (was 152, 5% more), 48 for none (was 40), 544 at most (was 536), which the floor's stride and token-offset limits are checked against. One record shape for every kind stays: a kernel cannot know a buffer's kind when it is translated, so it writes one shape whatever buffer it reaches. The main lane accepted this on the condition that the already-landed kinds' rows run again at the new layout. Translator (lower/access/icb.rs): a render_command's draw_indexed_patches writes what draw_patches writes (the draw's VkDrawIndirectCommand of patches, the factors' and the patch indices' Metal addresses) and the control-point indices' Metal address at the new place (CONTROL_POINTS_AT, IndirectDrawLayout::control_point_indices). Its operands are draw_patches's, with the control-point indices at operand 6. Runtime: Device::new_indirect_command_buffer takes DRAW_INDEXED_PATCHES alone (CommandDraw::IndexedPatches), refused as patch draws are on a device whose executions run no tessellation stage (TessellationStages). Its layout pushes the control-point indices' address where the control stage reads it (FieldValue::ControlPointIndices), holds no index buffer token, ends in TOKEN_DRAW and names the tessellation stages. An execution checks the state's control-point index type against the buffer's kind, as a direct draw checks it against the call: patch draws with a state of an index type are Refusal::PatchDrawWithIndexType, and indexed patch draws with a state of none Refusal::IndexedPatchDrawWithoutIndexType. This replaces the patch draws' check through an empty PatchReads. Docs: the runtime README's ICB section (records, tokens, refusals, floor limits); the API guide's section 1; METAL-COVERAGE (coverage.tsv); CONFORMANCE-COVERAGE and REFUSALS.md regenerated (the two refusals gain the draw site); the API signature table blessed for control_point_indices. Tests: the red commit's engine and runtime device tests; the layout's unit tests at the new offsets, the reset command's control-point place among them; a unit test of the indexed patch tokens. |
||
|
|
08447f8aff |
ICB: a kernel's patch draws into an indirect command buffer, executed through a layout of patch draws
The owner's 3406 order, the planner's next indirect command kind: MTLIndirectCommandTypeDrawPatches. Translator (lower/access/icb.rs): a render_command's draw_patches writes VkDrawIndirectCommand (the patch count, the instances, the patch start and the base instance) where a plain draw's goes, and in the index token's 16 bytes, which a buffer of patch draws does not read as a token, the tessellation factors' Metal address and the patch indices' (0 for the null pointer). The records stay one shape for every kind (pipeline::IndirectDrawLayout::factors and ::patch_indices name the two places). The control-point count is not read, as a direct patch draw does not read it; the factors' instance stride and the factor scale are read only under a per-instance step function or tessellationFactorScaleEnabled, which the runtime refuses at the pipeline state. A post-tessellation vertex function of a state made for indirect command buffers is compiled under LoweringInputs::indirect_range (pipeline/compile.rs), so each evaluation tests its command against the execution range as a plain vertex function does. Runtime: Device::new_indirect_command_buffer takes DRAW_PATCHES alone, the buffer's kind CommandDraw::Patches. Its command layout pushes the factors' and patch indices' addresses where the state's control stage reads them (FieldValue::TessellationFactors, FieldValue::PatchIndices), holds no index buffer token and ends in TOKEN_DRAW; the layout and each execution name the tessellation control and evaluation stages beside the vertex and fragment ones (dgc::PATCH_STAGES). An execution of patch draws draws a patch list with a post-tessellation state and reads no tessellation factor buffer of the encoder's; a state that is not post-tessellation is Refusal::PatchDraw, as is a post-tessellation state with a buffer of other draws, and a state of a control-point index type Refusal::PatchDrawWithIndexType, as for a direct patch draw. VUID-vkCmdExecuteGeneratedCommandsEXT-supportedIndirectCommandsShaderStages-11060 requires the bound stages in the device's supportedIndirectCommandsShaderStages, so the floor reads whether they hold the tessellation stages (IndirectCommandLimits::tessellation_stages) and a buffer of patch draws is refused without them, a new kind, IndirectCommandsKind::TessellationStages. Mesa's source answers VK_SHADER_STAGE_ALL_GRAPHICS on RADV and VK_SHADER_STAGE_ALL on lavapipe. Two draw kinds together, DRAW_INDEXED_PATCHES and the rest stay CommandTypes. Docs: the runtime README's ICB section and refusal line; the API guide's section 1; METAL-COVERAGE (coverage.tsv); CONFORMANCE-COVERAGE regenerated; the API signature table blessed for the new field, methods and variant. REFUSALS.md regenerated with no change. Tests: the red commit's engine test and runtime device test, with the device test's arm for the TessellationStages refusal; a unit test of the patch tokens; the floor's limits test reads the tessellation stages. |
||
|
|
21f0cae67b |
ICB: a kernel's plain triangle draws into an indirect command buffer, executed through a layout of plain draws
The owner's 3406 order, the planner's first indirect command kind: MTLIndirectCommandTypeDraw. Translator (lower/access/icb.rs): a render_command's draw_primitives of the constant triangle type writes VkDrawIndirectCommand (vertex count, instances, vertex start, base instance) where an indexed draw's VkDrawIndexedIndirectCommand goes, 20 bytes past the index token's place, and writes nothing else. Both kinds share the records (pipeline::IndirectDrawLayout), so an encoding writes one shape whatever buffer it reaches. A kernel cannot know a buffer's kind when it is translated, because it reaches the buffer through an argument buffer. A reset's draw of nothing reads as either kind's. Points and lines stay refused, as for indexed draws, because an execution draws one topology. Runtime: Device::new_indirect_command_buffer takes DRAW alone as well as DRAW_INDEXED alone, and the buffer keeps its kind (indirect::CommandDraw). An execution's command layout follows the kind. A layout of plain draws holds no index buffer token, which VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11095 forbids there, and ends in TOKEN_DRAW. Its tokens are one fewer. The execution shapes' cache keys on the kind, and the reset templates serve both kinds. DRAW together with DRAW_INDEXED stays a typed refusal, CommandTypes, until the planner rules. A layout takes one draw token (VUID-...-11100), and no form found draws both kinds in command order at a bounded cost: two executions reorder the commands, an execution per command costs two a command, and identity indices hold only as many vertices as a bound buffer of them. The CommandTypes doc, the runtime README's ICB section and its refusal line say so. Docs: the README ICB section; METAL-COVERAGE (coverage.tsv: "plain or indexed triangle draws"); CONFORMANCE-COVERAGE regenerated for the new row's recording and ledger row. REFUSALS.md regenerated with no change. Not run on an Intel card: the Iris Xe lacks VK_EXT_device_generated_commands, so its ledger row is the Extension refusal; the four-card proof jobs are named in the hand-over. |
||
|
|
c50fd04219 |
rt: drawIndexedPatches, and patch draws through a patch index buffer
The runtime refused a patch draw through a patch index buffer
(Gap::Draw of DrawKind::PatchIndexBuffer) and had no indexed patch draw.
The viewer draws every patch with drawIndexedPatches, indirectly, through
a nil patch index buffer and a UInt32 control-point index buffer (reims's
walk at development
|
||
|
|
71aa9829d0 |
Validation cases: Metal's answer for a row of floats written four at a time with its tail guarded
Four authored cases over engine/split_store_tail, 16 threads at two a row over 8 rows, out filled with 0xCD: sst_split at rows of 7, 6 and 5 floats (each row's second thread writes three, two or one float after its first) and sst_block at rows of 7 (the four in one block, nothing where the row does not hold them). A row starts at 4w bytes times its index, so the first word of a run of four sits at every residue of 16 across the rows. Installed with corpus-case-check (m3-max-80423) and qualified on Metal on the Apple M3 Max, three executions each (m3-max-80428). Each Metal output equals the MSL's stores computed on the CPU, byte for byte (output sha256 d875b981, 2f994d06, 1a84d360, 21ceb16b). scripts/qualify-public-cases now runs the four on lavapipe against those rows. At the branch's last commit their Vulkan runs match Metal on lavapipe (m3-max-80560), the AMD Radeon RX 7900 XTX (m3-max-80568) and the AMD Radeon 780M (m3-max-80570). Not run on an Intel card. |
||
|
|
c1f999eb06 |
rt: pipeline states answer Metal's allocatedSize as their translated SPIR-V's bytes
ComputePipelineState::allocated_size and RenderPipelineState::allocated_size answer MTLAllocation's allocatedSize, which both Metal pipeline states adopt. The answer is our code's size, not the driver's compiled binary, which the runtime does not measure. A compute state answers its kernel's module, the one its interface is read from. A render state answers its stages' modules, summed. Both numbers are taken from the translation when the content is made and kept as a u64 in the content (a compute content's Answers, a field of RenderCompiled); no module is kept for them. Every device takes the same form. No variant counts: not the emulated-SIMD-group or partial-threadgroups variant lowered with a compute state, not one made at a dispatch (the emulated-partial variant), and not a render content made later for a pass. So the answer never changes once a state is made, and two states of one content answer one size. docs/API.md's accepted differences (Heaps and memory) gets the entry. MTLAllocation.allocatedSize stays missing in the coverage ledger: buffers, textures and heaps still lack it. Its note now names the pipeline states' answers, and docs/METAL-COVERAGE.md is regenerated. api_signatures.tsv is blessed with the two methods. Tests: - state_answers: a new test. block_scan (plain module) and sample_down (partial-threadgroups variant) answer non-zero. Each equals the bytes of the module the state keeps (a test-only Kernel::module_bytes). The render state of first_texel_fragment answers the sum of the translator's compile_render_pipeline stages' SPIR-V lengths. Two states of one content answer one size. - translate.rs: the ragged-grid test on emulated SIMD groups now also checks that a state's answer is the same after the dispatches that make the variant later. Verified: job m3-max-79929 on lavapipe, a check of this tree. - signatures --check, coverage --check, clippy (plain, m2v_gpu, m2v_cpu_icd), workspace doc and the runtime's private doc: all 0. - The runtime suite: 928 passed, 3 skipped. - The two tests rerun with output: both pass. On lavapipe the variant already emulates its SIMD groups, so the ragged test makes nothing at a dispatch there. No card run yet. |
||
|
|
86386c4873 |
Refusal surface: --check compares the totals, and REFUSALS.md counts Refusal::TextureUsageAtSlot
docs/REFUSALS.md listed 89 runtime Refusal variants but its two totals tables still counted 88 (and 24 metal-measured where there are 25). A union of two branches' rows keeps every variant row and one side's totals, and --check compared only the variant rows, so it passed. The totals count variants alone (no sites, no line numbers), so they are structural: --check now compares them too. Verified locally (plain script, no build): with the old REFUSALS.md, --check exits 1 naming the two stale Refusal totals rows; after regeneration it exits 0. The regeneration changes only those two rows; basis.rs is unchanged. |
||
|
|
b723c90272 |
rt: Device::default_sample_positions answers getDefaultSamplePositions:count:
The runtime answered no default positions (its README's known gap). Device::default_sample_positions answers a count with the positions a pass of that many samples that sets none rasterizes at: Vulkan's standard sample locations, which the floor's standardSampleLocations makes every such pass take, and which are plain Metal's answers at 1, 2 and 4 samples on an Apple M3 Max, macOS 27.0.1 (probes/default_sample_positions.m, m3-max-78953). supports_texture_sample_count answers at most 1, 2 and 4, so no other count is answered. A count it does not answer is Refusal::DefaultSamplePositions (basis metal-measured: plain Metal asserts "count (n) is not supported on this device." and ends the process, at 0, 3, 5, 6, 8, 16, 17, 32 and 33 on the M3). README (the device's answers; the sample-positions gap sentence), coverage.tsv (I), and the generated REFUSALS.md, basis.rs, api_signatures.tsv, METAL-COVERAGE.md and CONFORMANCE-COVERAGE.md. Verified on lavapipe, job m3-max-79650: clippy, doc and private doc EXIT=0; the runtime suite 923 passed, 3 skipped. Metal's answers: m3-max-78953 (Apple M3 Max). |
||
|
|
d9054b5164 |
Validation: a play's gauge records are the runtime's objects past the play's own, of each kind the program makes one at a time
A play's frames 100 and 200 are not one loop's iterations: the program makes and releases objects between them (glbench-3090-r4 holds 62 textures at frame 100 and 690 at 200), so a runtime gauge held flat there judged the program. The matrix's records of a play are now, for buffers, textures, samplers and events, the runtime's live objects of the kind less the play's own (`KIND_excess`): the stream's live objects the backend made, and the backend's own that stand for them (two-copy Managed buffers' CPU copies and the released ones a commit still copies, the asides, the guest RAM scratches; the planes' shapes, one texture a plane and shape that the plane's surface textures and views are views of; the video and exported surfaces' planes). The settled end lines at frames 100 and 200 carry the play's count of each kind as KIND_held. An excess below zero is written as it is, which results.py takes for no count. The runtime's other kinds follow the program's objects and work, not one object each: they are not replay records (the harness's loops hold those its workloads reach), and every kind stays held at zero at the device's drop. Verified: in the hand-over. |
||
|
|
f4eb47d792 |
Validation: a play's gauges at frames 100 and 200 go out as the matrix's records, every kind on its end lines
What: - The runtime backend's end lines (`Backend::live`) carry every count of an object kind the runtime keeps live: samplers, LOD clamp variants, level elements, kernel variants and entries, render contents, attachment views, descriptor slots, device samplers, shadows, resolve images, plane stand-ins, buffer set pools, surface buffers, indirect command buffers, releases waiting and handles out join them, and the pipeline cache's bytes. - At the ends of frames 100 and 200 (GAUGE_FRAMES) the player reads them once they hold still (Backend::settled_live): the runtime backend reads them every 10 ms until no release waits and two reads in a row agree on every recorded kind, for at most 2 s, a wait no frame's time holds. What the program released goes on the runtime's block-maker and reaper threads after the work before it retired, so a read straight after the frame's waits could differ between two plays. - command-replay prints, where the play ended frame 200 and skipped nothing by then, `M2V-MATRIX gauge replay-rt/STEM/GAUGE@100` and `@200` for each kind of GAUGED (gauge_records). scripts/matrix/results.py judges them as it judges the harness's: equal at 100 and 200, blocks no higher at 200. - Left out, and why: handles_out (1 while the play holds the device), releases_waiting (lowered by the block-maker thread whenever it runs), private_units (a layout of memory that follows the bytes the program holds), and every byte and age gauge, which follows the program's content and the pool's idle clock: the pipeline cache's data (bound 128 MiB), the translator's entries' bytes (bound 64 MiB), the staging bytes, the pool's allocated, idle, reserved, reused, taken and block bytes, and the shadows', resolve images' and stand-ins' bytes, whose counts are recorded. Why: the matrix's leak rule (live gauges per resource kind flat between iterations 100 and 200) reached only the harness's compute workloads. The kinds only draws and passes make (render contents, attachment views, shadows, resolve images, stand-ins, the samplers draws reach) had no such check, and a play's end lines lacked 17 of the kinds. Docs: REPLAY-STREAM.md section 10 (the end line's gauges, the settled read, the records), VALIDATION.md's gauge row, command-replay's module doc. Tests: replay::tests the_player_settles_the_gauges_at_frames_100_and_200_alone and the_gauge_records_are_the_counted_kinds_at_frames_100_and_200; replay::rt_replay the_end_lines_carry_every_gauge_the_gauge_records_carry (device); test_results.py test_a_plays_gauges_at_frames_100_and_200_are_held_flat_as_the_harness_s. Verified: in the hand-over. |
||
|
|
9a89d5e25c |
CI: the lavapipe image's udmabuf decided by the node's presence, its downloads saved on fetch, its build step limited
lavapipe exports a dma-buf through /dev/udmabuf. The image's containers now get the host's node wherever the host has one (docker's daemon opens it for them; rootless podman only where the user may), with the node's group, and `lavapipe-image udmabuf`, which the build step runs, says which. Where they get none, `nextest` skips the tests and `replay` (new: the conformance replay in the image) leaves out the cases scripts/lavapipe-image/needs-udmabuf names, each named in the log: those are measured, each failing without the node and passing with it. The workflow decides by the node's presence alone; no test is loosened. LAVAPIPE_IMAGE_UDMABUF names another node, or none, which is how the lab's replica shows what a runner without the node runs. The downloads are restored before the build and saved right after it, keyed on the pin (the tarball's sha256, the date and the packages' versions), so a job whose later steps fail still keeps them. The build step's limit is 90 minutes: a cold fetch at the slowest rate measured from the archive, one connection at 57 KB/s, of the 127 MB tarball and 135 MB of databases and packages (262 MB) takes 77 minutes. A fetch that fails ends the build step with the URL and curl's status, or pacman's, before any test runs; the fetches retry three times. Measured at this change's parent plus the probe (job m3-max-79668, lavapipe on x86-64 AVX2, no node passed in): of 807 device tests run, 806 pass and replay::rt_replay::a_video_surface_is_waited_for_at_its_ready_point_once fails with "the device exports no DmaBuf"; with the node (m3-max-79517) every one passes. The four surface-textures cases are refused at replace-region without the node (m3-max-79408) and hold the ledger's expectations with it (m3-max-79517). |
||
|
|
7687644485 |
CI: the device-executing steps run on lavapipe in an image of one Arch Linux Archive date
CI's lavapipe steps ran on Ubuntu's Mesa 26.0.8 (LLVM 21.1.8), whose llvmpipe faults in its JIT code on the conformance case reconvergence-constructs' rc_break draw (a null load on its rasterizer thread), while the ledger's llvmpipe rows were recorded on Mesa 26.2.4 with LLVM 23.1.1. The device tests, the conformance replay and public case qualification now run in a container image of exactly that Mesa and LLVM, and nowhere else. scripts/lavapipe-image/pin names the image: the Arch Linux bootstrap tarball of 2026.10.01 and its sha256, the archive date 2026-10-05 its packages come from, and each package's exact version (vulkan-swrast 1:26.2.4-1, llvm and llvm-libs 23.1.1-1, vulkan-icd-loader and vulkan-validation-layers 1.4.363.0-1, spirv-tools 1:1.4.363.0-1, vulkan-tools 1.4.363.0-1, python 3.14.7-1). scripts/lavapipe-image/lavapipe-image builds it: the tarball by curl -A curl, checked against the sha256; its root imported with docker or podman; then pacman, against that date's archive repositories alone, fetching through curl -A curl (XferCommand), with signatures required and checked by the bootstrap's own keyring. Its downloads stay under ~/.cache/m2v-lavapipe-image, which CI caches keyed on the pin, so a run whose pin has not moved downloads nothing. `ensure` prints the pin, the packages the image holds and its device's name and driver, and fails where any differs from the pin or from the ledger's new `# llvmpipe:` line, which names the venue's Mesa, LLVM, loader and layers. That line holds upstream versions: the image is Arch's build (mesa 1:26.2.4-1), and the rows were recorded on another distribution's build of the same release (3:26.2.4-1). The tests are built on the host and only run in the image, with no network, only the environment named, and the checkout mounted read-only (qualification writes the corpus alone). lavapipe exports a dma-buf through /dev/udmabuf, so a container gets the host's where the host's user may open it, and offers the exports the host's lavapipe does. Each container is held to its job's memory (LAVAPIPE_IMAGE_MEMORY, else the host's) and CPUs (CARGO_BUILD_JOBS, else the host's), since the container runtime runs it outside the job's processes. The archive serves a connection slowly at times, so the build fetches the transaction's packages eight at a time with the same curl command before pacman runs. The device tests are the tests the --cfg m2v_cpu_icd build lists and the plain builds do not (only_in.py): a test that opens a device compiles only under the cfg, and the plain builds' tests, the .ll fixtures' test with Ubuntu's LLVM 21 among them, run on the host as before. They go into the image as a nextest archive, which needs no toolchain there; the replay and qualification run the binaries built in the checkout. The host keeps the Vulkan loader and no driver. AGENTS.md and CONTRIBUTING say in one sentence each that the pin and the ledger's line move together. Verified in the lab's replica of CI's Linux job (job m3-max-79517, at this change on e086e51c7e, docker 29.10.1, lavapipe on x86-64 AVX2): the image builds from the cached downloads in 55 s and its check passes (every package equal to the pin; "llvmpipe (LLVM 23.1.1, 256 bits)", "Mesa 26.2.4-arch1.1 (LLVM 23.1.1)"). The device tests: 810 listed, 809 run, 809 passed. The conformance replay holds exactly the 4,712 open gaps the ledger expects on llvmpipe, with no fault. Public case qualification passes. Without /dev/udmabuf (m3-max-79408) one device test met "the device exports no DmaBuf" and the replay refused four surface-textures cases at replace-region; with it both are as the ledger expects. The two red host steps of both runs, golden_hashes and the pinned opened chains, are the tables the next pin blesses, not this change. |
||
|
|
1c307b4608 |
Runtime: a pass rasterizes at the sample positions its descriptor sets, through VK_EXT_sample_locations
L168: a pass's custom sample positions were dropped while the guest could be told they are supported, so a non-default set rendered at the standard positions with no refusal. What changed: - VK_EXT_sample_locations joins the floor's OPTIONAL_EXTENSIONS (enabled where listed; it has no feature). Device::programmable_sample_positions_supported (programmableSamplePositionsSupported) is true where the device lists it with locations at every sample count above 1 it renders, a 1 x 1 grid, every sixteenth from 0 to 15/16 and variableSampleLocations; false elsewhere. No second form: a device that answers no refuses positions other than the defaults. - RenderPassDescriptor::sample_positions is checked as the pass begins (crate::positions): each coordinate is taken to the nearest sixteenth, a tie up, at most 15/16, and each sample past the positions given at the pixel's corner, as the conformance suite's sample_positions rows measured an Apple M4. A set that comes to Vulkan's standard locations (Metal's defaults at 1, 2 and 4 samples) rasterizes as an empty one on every device. - Refusal::SamplePositions (Count, Coordinate, OneSample, Unsupported) where Metal's validation stops the descriptor or the device answers no. Gap::RenderPass of SamplePositions for other positions beside a depth attachment (Vulkan needs a sample-locations-compatible depth image whose layout transitions name the last locations) or at a count the device's locations lack. Gap::Draw of SamplePositions for a draw in such a pass whose fragment module uses InterpolateAtSample (VUID-01524), read from the translator's GraphicsState. - A draw in such a pass takes a VkPipeline of its class made with sampleLocationsEnable and the locations as dynamic state (Raster::positions), one pipeline for every set; the encoder records vkCmdSetSampleLocationsEXT before the pass's first draw. Every coordinate handed to Vulkan is a sixteenth in [0, 15/16], which Vulkan's required 4 sub-pixel bits hold exactly, so no precision note. - The translator's description of a device that enables the extension states it (floor::shader_extension), as for every extension creation enables that the translator names; the translator reads none of its properties. tests::translator_fields gives GraphicsState::interpolates_at_sample its verdict (refused at custom positions). - The conformance rt side passes a case's positions to the runtime; the replay player sets them on the runtime's descriptor and drops its count of passes at other positions (docs/REPLAY-STREAM.md says so). - README (floor table, the device's answers, the known gap rewritten), REFUSALS.md and basis.rs, api_signatures.tsv, METAL-COVERAGE.md and CONFORMANCE-COVERAGE.md regenerated. Tests: the device test every_device_rasterizes_a_pass_at_its_sample_positions now gates on the device's answer and holds the answer to the extension's properties; new device tests every_device_refuses_the_positions_metal_refuses and a_draw_that_interpolates_at_a_sample_is_refused_at_custom_positions; new device-free tests (placed::) of the answer's gates (each count above 1 the device renders in sampleLocationSampleCounts, a 1 x 1 grid, a range holding 15/16, 4 sub-pixel bits, variable locations) and of the placement (every coordinate in [0, 1) on a sixteenth from 0 to 15/16, refusals, the corner, the standard sets, the count and depth gaps); the replay device test sample_positions_play_through_the_runtime_s_descriptor. Verification: the lane's jobs, named in the ledger commit that follows. |
||
|
|
c231c41ddd |
scripts: rustc-wrapper runs under bash, so the compiler keeps Cargo's hyphenated variables
The remote CI's Linux leg has failed "Clippy (warnings denied)" on master since at least
11-15 (run 43704398652 and every push after it, 46893773054 at
|
||
|
|
d0664f2c10 |
CI: qualify the float and half function-constant cases on lavapipe
scripts/qualify-public-cases runs a named list of the owned public cases on lavapipe against their committed Metal observations. It now names lane fcfloat's 15 cases (engine/fc_float_gate: a kernel's gated argument and a fragment's gated sample mask; engine/fc_half_gate: the sample mask), so CI keeps Metal's answer for a float or half predicate: present at 1.5, -0.0 and a quiet NaN, absent at +0.0 and unsupplied (Apple M3 Max, jobs m3-max-75714, 75716, 75726). The lane's candidate ran these 15 on lavapipe at 7de0a8c8bb's tree plus the half fixture: 15/15 Match, every slot current (job m3-max-75728). The script itself runs in the gate at the pin tip. |
||
|
|
c718924d44 |
CI: qualify the AIR 1.8 sampling case on lavapipe with the other public cases
scripts/qualify-public-cases runs case 884ad7d75a22 against its committed Metal row. Run by hand under the same operator environment (ci-lavapipe, job m3-max-73980 on lavapipe 23.1.1): Match, candidate output 7d65bff73d82, Metal's bytes. |
||
|
|
ab24c9617f |
Docs: comments that named a deleted module or file say what is true now
Six comments sent readers to `device::driver_facts` (the release-keyed deviation table) as the
place a driver's measured deviations come from. The module is gone and `Device::from_queries`
reads no identity, so each now says that translation takes no deviation and reads no driver
identity:
- crates/metal2vulkan/src/ash_interop/query.rs (the format query's note),
- crates/metal2vulkan/src/device/description.rs (`device_name`'s doc),
- crates/metal2vulkan/src/device/khronos.rs (the module docs' deviations paragraph),
- crates/metal2vulkan/src/device/tests/description.rs (`a_stated_deviation_is_refused`'s doc),
- scripts/regen-device-profiles/README.md and regen_device_profiles.py (the Deviations text).
lib.rs's note on the crate-private modules drops its design citation and the claim that lowering
and the binder's replay share `indirect_commands`: no lowering reads it, and validation's case
model and Metal executor reach it as `bind::indirect_commands`.
The ASTC HDR probe's header (crates/metal2vulkan-conformance/probes/astc_hdr_textures.m) named
the runtime's `astc.rs`, which does not exist; it now points at `bind::astc_decode`'s docs and
the `astc-*-hdr` recordings. No recording or test fingerprints the probe's source:
`git grep -n 'astc_hdr_textures'` finds only the probe itself, a sibling probe's comment and two
doc comments under bind/astc_decode.
Zeros, at metal2vulkan
|
||
|
|
3c52ee1cf1 |
Render pass: a colour attachment renders one depth plane of a 3D texture's level
What: RenderPassColorAttachmentDescriptor takes `depth_plane` (Metal's `depthPlane`). A 3D texture of RenderTarget usage is made 2D-array-compatible (VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, in its image format query too: Plan::flags, from the image's type and its colour attachment usage, no query). attachment_view then takes the plane of a 3D texture's level as a 2D view of that one layer (base layer = depthPlane, at the level), checked against the level's depth (Refusal::AttachmentPlace past it). Every barrier on a 3D texture's image (its attachment's, its copies' and its moves', texture::barrier_layers) names the image's layers as 0 and VK_REMAINING_ARRAY_LAYERS, so each moves every plane of the level it names. Before, every such pass was Gap::RenderPass of RenderPassKind::TextureType. Still TextureType: a 3D texture in a layered pass (renderTargetArrayLength 2 or more), a depth or stencil attachment of a 3D texture, a 3D resolve texture, and a resolve's depth plane but 0. A draw that reads, through a shadow (a device without the attachment feedback loop), a 3D texture whose plane its pass renders is Gap::Draw of DrawKind::AttachmentRead: a shadow's copies are of layers. The floor asks a device that lists VK_KHR_portability_subset for imageView2DOn3DImage too (VUID-VkImageCreateInfo-imageView2DOn3DImage-04459), as it asks multisampleArrayImage. Why: a guest route meets the refusal. A browser's GL layer clears every 3D texture of an RGB-family format (RGB8, RGB16F) at creation through a pass on each plane, to set the alpha it emulates; it also renders into a plane for framebufferTextureLayer(TEXTURE_3D, k) then a clear or a draw, for a level sampled before a full upload, and for copyTexSubImage3D. The consumer's route showed the key at |
||
|
|
0630c1d9a7 |
Translator: specialize refuses an instruction it would leave half specialized
pipeline::specialize copied every instruction outside its list as it was. An OpExecutionModeId (a LocalSizeId mode among them) beside a WorkgroupSize composite would leave the entry point with two sizes, and an OpDecorationGroup could carry a SpecId the pass never reads, so that constant would keep its default. The translator writes neither, so the pass now refuses both with an Error::Internal that names the instruction. An OpSpecConstantOp of an opcode outside SpecOp was already refused; its refusal now names the opcode. Op::ExecutionModeId and Op::DecorationGroup move into every build, and ExecutionMode::LocalSizeId into test builds. Both come through scripts/regen-spirv-grammar's items.txt and a regeneration from Khronos's grammar (vulkan-sdk-1.4.341.0); table.rs comes out unchanged. Test: a_module_of_an_instruction_the_pass_does_not_specialize_is_refused takes the deep kernel with an OpExecutionModeId LocalSizeId of its LocalSize constants, with an OpDecorationGroup, and with an OpSpecConstantOp turned to ISub. Each must be refused, and the refusal must name the instruction. The next check job runs it. |
||
|
|
ed4b0ecd76 |
rt: storage textures written or read at a run-time level, through runs of set 1's level elements
What: under the identity domains a storage slot written, read or size-queried at a level other
than the constant 0 indexes a run of set 1's storage-image array instead of being refused as
Unsupported{IdentityDomains} ("an encoder value the function reads as TextureLevels(S)"). The
translator pushes the bound texture's level count (PushField::TextureLevels) and the run's first
element (the new PushField::TextureLevelBase, beside it), states no StorageTextureLevels or
StorageTextureLevelViews fact, and an access at level l takes element
first + min(l, max(n, 1) - 1) of the array, NonUniform, inside l < n. A texture of one level
pushes its own index, nil 0 with count 0.
The runtime's binding 1 grows by 65,536 level elements past its 65,536 textures, 4,096 runs of 16
(floor::LEVEL_ELEMENTS, floor::LEVEL_RUN). The first dispatch or draw that binds a texture of more
than one level to such a slot (the encoder's checks, compute and render stages alike) gives it a
run: a single-level storage view of each level, of its storage element's type (a cube's level as
the 2D array of its faces, a view's from its own first level), written at the run's elements. A
later bind takes the texture's lock and pushes the same two words: no Vulkan call. The run goes
back through the pool and reaper once the texture is released and its work retired: elements null,
views destroyed (Gauges::level_elements). Every run held, or a texture of more than 16 levels, is
the new Limit::LevelElements { max: 4096 }, and the dispatch or draw does not run. The floor's
storage-image limits and both totals rise by 65,536: storage 196,608, per-stage resources 327,688,
pools 351,680; every lab device's profile is far above (llvmpipe 1,015,808 storage, the least).
SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION bump in the branch's last commit (a new PushField).
Why: 17 guest kernels in 6 libraries were refused at state creation by this form.
Docs: REFUSALS.md and the signatures table regenerated, RESOURCE-ID.md (binding 1 past 65,536),
API.md (storage levels under identity), the runtime README (Set 1, the floor table, the known-gap
line replaced by the Limit), the runtime-floor profile's limits, and the conformance ledger's
level-sizes-storage row removed.
Checked by: engine_texture_levels' identity test and the runtime's storage_levels device tests
(red at 6ad1c33124: jobs m3-max-70886 and m3-max-70892 on lavapipe), engine_identity's
a_storage_slot_written_at_a_run_time_level_is_an_element_of_its_run; the lane's jobs report the
runs per card.
|
||
|
|
624c5a38b9 |
Translator: a fragment's quad votes are OpGroupNonUniformQuadAllKHR and QuadAnyKHR, helpers included
What: in a fragment function, Metal's quad_all and quad_any are now
SPV_KHR_quad_control's OpGroupNonUniformQuadAllKHR and
OpGroupNonUniformQuadAnyKHR of the predicate, in place of the quad's four
bits of the ballot of the predicate (compared with the ballot of the
active lanes for quad_all). Kernels and vertex functions have no helpers
and keep the ballot form. The IR gains GroupInst::QuadAll beside
QuadAny (no scope operand; QuadControlKHR, SPV_KHR_quad_control and
shaderQuadControl), and the builder's group_quad_any becomes
group_quad_vote(all, pred), as group_vote is. The interpreter, the
serializer and the requirement deriver follow. items.txt lists
GroupNonUniformQuadAllKHR, and scripts/regen-spirv-grammar regenerated
spv.rs from SPIRV-Headers vulkan-sdk-1.4.341.0: the opcode loses its
cfg(test); the test parser's table already held it.
Why: Metal's helpers are active lanes of their quad and take part in
its votes. Vulkan section 9.31 runs quad group operations over a quad's
helpers in every entry, and its other group operations, the ballot
among them, only where the entry declares MaximallyReconvergesKHR. AMD's
open Vulkan driver leaves a partly covered quad's helper out of the
ballot even though the entry declares MaximallyReconvergesKHR beside
RequireFullQuadsKHR (report 142), so a vote read through the ballot
missed the helper: the runtime test quad_votes read quad_any(x > y) = 0
and quad_all(x <= y) = 1 on the 12 covered pixels of the diagonal quads,
where Metal answers 1 and 0 (m3-max-70847, AMDVLK 2025.Q2.1 on the RX
7900 XTX and the Radeon 780M; RADV right on both). The quad vote
instructions are right by the spec on every device whatever the entry's
reconvergence (rung 1), the form the quad reductions took (
|
||
|
|
9f6712f172 |
Translator: spv.rs names OpGroupNonUniformQuadAnyKHR outside tests
The fragment quad reduction emits it (1c64701191), so items.txt lists it and scripts/regen-spirv-grammar regenerated spv.rs from SPIRV-Headers vulkan-sdk-1.4.341.0: the opcode loses its cfg(test). The test parser's table already held it. 1c64701191 alone does not build without this commit. |
||
|
|
5a03a60b6c |
rt: Device::max_threadgroup_memory_length, Metal's maxThreadgroupMemoryLength less the vote word
The answer is the device's maxComputeSharedMemorySize less the 4-byte vote word a kernel's partial-threadgroups variant may take beside its threadgroup memory, rounded down to 16, and at most Metal's 32 KiB: 32,752 on a device of 32,768 bytes (AMD's drivers on the 780M, lavapipe, MoltenVK on the M3), where a Mac answers 32,768; 32,768 on RADV, NVIDIA and ANV. A guest that sizes its threadgroup memory from it (a length it sets, or source it compiles at run time) runs its ragged grids, where 32,768 is refused (Gap::PartialThreadgroups for static memory, Limit::ThreadgroupMemory for a length). The word is one constant, pipeline::VOTE_BYTES, which the module interface's vote word reads too. It changes only the answer: every dispatch is still checked against the device's own limit. An emulated SIMD group's scratch varies by kernel and is not counted; the runtime README records it with the refusal a kernel past the answer keeps, and the unaudited cost to a guest that rounds the answer down to a power of two. Tests: the scan test reads the answer and checks its formula; a kernel whose variant takes no vote word runs [25,1,1] and [1024,1,1] in [1024,1,1] with a length of 32 KiB, past the answer (every_device_runs_a_kernel_without_a_vote_word_at_a_length_past_its_answer). METAL-COVERAGE and the api_signatures table are regenerated. Not yet run. |
||
|
|
058fd25a7b |
Translator: MSL 3.2 program-scope buffer bindings become buffer parameters; other shapes refused apart
What: `!air.global_bindings` decodes into `AirAbi::global_bindings` (`GlobalBinding`: the
global, and its node's role, type information and name, read by the parameter-node decoder;
the node's index is -1). Canonicalization (`canon::global_binding`, beside the global
built-ins) makes each plain load of a bound buffer's pointer (device or constant space, one
stated slot) a read of a parameter: the entry's own parameter of the binding's role and type
where it takes one, else one appended, shared by the bindings of one role and type. Lowering
then binds it where a `[[buffer(n)]]` parameter binds; the runtime binds nothing new.
Why: the whole module was refused as ProgramScopeBinding (78 functions in 1 library of the
private corpus on runtime-floor and gate-lavapipe: kernels, one constant struct buffer each,
read only by plain loads of its pointer). Metal fills a bound global from the executing stage's
own argument table. Measured on an Apple M3 Max under macOS 27.0.1:
- m3-max-70268: a kernel's globals read and write the buffers bound at their indices;
reflection lists each as a binding at its index; a parameter and a global of one type at one
index, and two globals of one type at one index, read the one buffer; a vertex and a fragment
function reading one global each read their own stage's buffer at its index.
- m3-max-70306: Metal also takes a bound texture and sampler, bound threadgroup memory, a bound
sampler array, and a linked visible function of another library that reads a bound buffer.
What stays refused, each a refusal of its own (docs/REFUSALS.md regenerated):
ProgramScopeResource (a texture, sampler or threadgroup memory, one or an array),
ProgramScopeSharedSlot (a binding at a slot an entry parameter or another binding binds with
another role or type), ProgramScopeLinked (bindings in a linked or dynamic-library module),
ProgramScopeRead (a read of a bound buffer other than a load of its pointer, which
`xcrun metal` 32023.922 does not write). ProgramScopeBinding is gone: a consumer's exhaustive
match on Feature breaks, and a consumer's AirAbi literal needs the new field (git grep of the
consumer's checkout at aed8655a62: 0 hits for ProgramScopeBinding and for `AirAbi {`).
Tests: the ABI decode of a binding (a node with a parameter's index, or a global that is not the
externally initialized undef constant, is malformed); canonicalization over a kernel with three
bound buffers (two appended parameters, one shared with the entry's own) and the refused
shapes; linking and dynamic-library refusals.
|
||
|
|
0eb982e471 |
Runtime floor profile, conformance notices and ledger rows for the LOD-clamp variants
The committed runtime-floor profile (and its generator's RUNTIME_FLOOR block) states the floor's raised sampler limits: 24,000 maxPerStage and maxDescriptorSet UpdateAfterBindSamplers, 286,144 maxUpdateAfterBindDescriptorsInAllPools. tests::floor::the_floor_profile_states_exactly_the_floor failed without it on lavapipe (job m3-max-70138) and on the 780M, Iris Xe and RTX 3090 (m3-max-70152, -70153, -70151). The two sampler-bind-lod-clamps cases declare pixel-sampler-scaling, the static note of a sample through a runtime sampler slot, which fired on every venue (same jobs). The kernel case takes the ledger's dispatch_type row every compute-pass case of the rt side takes. compute-plural-texture-and-sampler-binding now compares its four-bindings site on lavapipe, which reads lavapipe's one-ulp 8-bit conversion, as compute-inline-bytes does over the same texture and kernel: a llvmpipe row. The cards compared it exact. |
||
|
|
29e54794ca |
Runtime: a sampler state bound with LOD clamps of its own samples with them
A bind's LOD clamps (setSamplerState:lodMinClamp:lodMaxClamp:atIndex:, its
vertex and fragment forms and the range forms) that read otherwise than the
state's own were Gap::LodClamps. Metal takes the call; on the M3 Max
(conformance cases sampler-bind-lod-clamps-kernel and -fragment) the pair
replaces the state's clamps, a lower bound above the upper reads at the upper's
level, and a plain bind afterwards reads the state's own clamps again.
How: such a bind takes the state's variant of the pair, the state's descriptor
with the pair as its clamps, its device samplers from the shared sampler table,
placed at a variant element of set 1's sampler arrays. The three sampler arrays
grow from 4,000 to 8,000 elements in the runtime's layout; elements 4,000 to
7,999 are the variants'. Shaders declare the heap arrays unsized, so the
translator is unchanged: a slot's sampler index is the runtime's push, and an
argument buffer's sampler index of 4,000 or more still reads element 0, so no
program-written ID reaches a variant. A state keeps its 16 most recently bound
variants; a new one past them takes the place of the least recently bound one
no command buffer holds, and where work holds all 16 the new one is held by its
command buffer alone. Past 4,000 live variants a bind is
Limit::LodClampVariants { max: 4000 }. The lod_clamp_variants gauge counts the
live variants. A NaN bound, which Metal documents no answer for, binds the
state as it is.
The floor's sampler limits rise to 24,000 (maxPerStage and maxDescriptorSet
UpdateAfterBindSamplers) and 286,144 (maxUpdateAfterBindDescriptorsInAllPools);
the lab's least are 500,000 (MoltenVK on the M3 Max) and 1,048,576 (Intel UHD
Graphics 630 on Windows), and Vulkan requires 500,000 of each with
descriptorIndexing.
Gap::LodClamps goes; REFUSALS.md, basis.rs, the signature table, the Metal and
conformance coverage pages regenerate. The validation replay plays clamped
binds (no skipped_clamped_samplers). The ledger drops three rows the clamped
binds now answer (compute-plural-texture-and-sampler-binding steps 11 and 14,
render-state-unread-slots). The compute single clamp form's coverage row named
set_sampler_state; it names set_sampler_state_with_lod_clamps.
Tests: a kernel samples through the binds as Metal reads them; a state's 16
kept variants filled past that; the 4,000 variant elements filled past their
capacity; the gauge flat across a bind and retire loop and zero at device
drop. Verified: see the lane's report (jobs named there).
|
||
|
|
afbcfec9a7 |
Runtime: the compute encoder's imageblock size; a kernel's explicit imageblock is dispatched
ComputeCommandEncoder::set_imageblock_size is Metal's setImageblockWidth:height:. The encoder keeps the size, 1 by 1 until a call sets one (Metal's size for an encoder that never sets one), and a dispatch of a kernel that reaches an explicit imageblock runs at it: the translator's SpecKey::ImageblockWidth and ImageblockHeight are specialized per VkPipeline (Constant::Imageblock), as a threadgroup memory length is. The dispatch's refusal (Gap::KernelInput naming RuntimeFact::ImageblockSize) goes. - encoder: Sizes carries the encoder's threadgroup memory lengths and imageblock size to decide() and threadgroup_memory(); Lengths holds the imageblock size for a kernel that reaches one (0 by 0 otherwise, so other kernels keep one pipeline whatever the encoder set), and its cells (w x h x cell bytes, rounded to 16) count in Limit::ThreadgroupMemory with the lengths. - pipeline: Variant keeps its Lengths (the key is ([u32; 3], &Lengths, bool)); an imageblock kernel has no main pipeline, as a kernel that takes a threadgroup memory length has none; keeps_plain counts the imageblock as encoder-sized memory. - Refusal::ImageblockSize: a side that is not a power of two (0 included) or more than 1024 cells, whatever the state's maxTotalThreadsPerThreadgroup, as Metal's validation layer stops them at the call (probe crates/metal2vulkan-conformance/probes/imageblock_size_rules.m, job m3-max-70002, M3 Max, macOS 27.0.1). - prepare_dispatch and dispatch_variant take the imageblock size as a fourth argument ([1, 1] where the encoder set none); a size the encoder would refuse makes nothing and answers None. The consumer's two call sites take the argument (planner, through main). - Validation: the engine candidate sets a case's explicit imageblock size and passes it to prepare_dispatch; KernelImageblock narrows to a tile pass's implicit imageblock (the runtime builds no tile function). No executor ABI bump: no recorded row ran an explicit imageblock case, which the requirement refused. The replay player plays setImageblockWidth:height:, and the pre-pass passes each dispatch's size. Form (step 0, jobs m3-max-69983, m3-max-69984): Metal compiles nothing for a new size (a new size's first dispatch 202-312 us median against 205-228 us second use and 222 us at the control size, a state's make 15-20 ms); a pushed size would size the Workgroup arena at Metal's 1024 cells on every dispatch. A new size here is one VkPipeline make at its first dispatch, a known gap. Tests: tests::imageblock (replacing tests::kernel_input): a dispatch never sized runs 1 by 1; one encoder runs 4 by 2 and 4 by 4, each read back, two first-use variant waits and no main pipeline; the setter's refusals. |
||
|
|
d825e52482 |
Validation: the suite's pins for the table work
- runtime-sources.sha256: the runtime inputs include the translator's bind module, where function_table_header and function_table_entry_offset became public; they lay out the words the shader already read, and no run of an unchanged artifact does anything else, so RUNTIME_VERSION does not move. - public_linked_modules_resolve_by_hash_without_a_private_store lists the new public linked module visible_table_ops. - coverage.tsv: MTLFunctionHandle's counterpart is the translator's FunctionHandle (the runtime re-exports it), and visibleFunctionTableDescriptor is VisibleFunctionTableDescriptor's Default, as the coverage test finds items. The three failed in the validation suite at dabc455312 (m3-max-69738: 1291 passed, 3 failed). |
||
|
|
11d8892858 |
Validation: an authored case calls through a kernel's visible-function table
visible-table-entry-by-thread-calls-add-mul-null-sub (af884d65cb): twelve threads of the owned visible_table_dispatch each call entry tid % 4 of a table of four, linking table_add, table_mul and table_sub from the owned module visible_table_ops, entry 2 left null. Installed with corpus-case-check and qualified on Metal on the M3 in the primary reference environment (m3-max-69730: three runs, 3, 3, 0xfffffffd, 0, 7, 15, 0xfffffffd, 4, 11, 27, 0xfffffffd, 8). The public qualification (CI's lavapipe step) now also runs it and the public table-query case 3a8f75e182, which the runtime refused before. |
||
|
|
28e2b0e6ca |
Validation: a kernel case's visible-function tables run through the runtime
The runtime candidate makes each table the case binds of the pipeline state (newVisibleFunctionTableWithDescriptor: of its size, each authored entry set to the handle of its linked function made with the case's constants, as the Metal oracle sets it) and binds it at its buffer index. ToolingRequirement::KernelFunctionTable, which held such cases to Metal alone, is retired; a render stage's table stays the runtime's limit (RenderFunctionTable). ENGINE_EXECUTOR_ABI does not move: no recorded row ran a kernel table case (they were refused). The runtime README states the device answer, the encoder's bind, the state's handles and tables, and the known gaps (a table's 64 KiB block, a consumer-compiled kernel's handles, an argument buffer's table). The coverage table marks the compute items implemented; METAL-COVERAGE.md and CONFORMANCE-COVERAGE.md are regenerated. Adds the owned linked module visible_table_ops.metal, whose companions scripts/regen-air-fixtures writes on the Mac. Verified: the lane's jobs. |
||
|
|
da020e5d7b |
Runtime: a compute kernel that reaches an explicit imageblock gets its state; its dispatch is refused
A compute pipeline state whose kernel reaches an explicit imageblock was refused at its make as
Gap::KernelInput of KernelInputKind::RuntimeFact naming ImageblockSize, which every arm64 macOS
guest boot meets once. The state is now made, and what stays refused is the dispatch, where Metal
reads the extent setImageblockWidth:height: set, which the compute encoder does not have:
- interface() takes RuntimeFact::ImageblockSize, keeping its cell bytes as Interface::imageblock,
and leaves SpecKey::ImageblockWidth and ImageblockHeight at the module's default (0 by 0)
instead of refusing them as a specialization it does not set.
- encoder::decide, which the dispatch, prepare_dispatch, dispatch_variant and the main pipeline's
key all go through, refuses a kernel with an imageblock first, as Gap::KernelInput of
RuntimeFact naming the fact (RuntimeFact::name). So no VkPipeline of such a kernel is made:
finish_pipeline has no main key, and a pre-pass gets no key. A dispatch of such a kernel that
writes no memory records nothing and is not refused, as for any kernel without effects.
- imageblock_memory_length_for_dimensions keeps its typed answer, Gap::ImageblockLength, for a
kernel that declares an imageblock: the one recording of Metal's answer for such a kernel
(conformance pipeline-facts-compute-imageblock, M3 Max, 256 bytes at 8 by 4 by 3) settles no rule.
The translator is untouched. Gap and KernelInputKind keep their variants; the docs of
Gap::KernelInput, KernelInputKind::RuntimeFact and Specialization, Gap::ImageblockLength (and its
basis line), the dispatch and the state's make say where the refusal now is. docs/REFUSALS.md,
docs/METAL-COVERAGE.md (setImageblockWidth:height:'s note) and docs/CONFORMANCE-COVERAGE.md are
regenerated. The runtime README's state facts and its known gap are re-worded, with the counts and
jobs kept. The conformance ledger's pipeline-facts-compute-imageblock row moves from case/state to
the facts' label and device (the consumer's own, as for every state) and imageblock_memory_length
(Gap::ImageblockLength). Validation's KernelImageblock requirement doc and its acceptance test's doc
name the dispatch's refusal and the renamed device test.
Test: tests::kernel_input::an_explicit_imageblock_kernel_is_made_and_its_dispatch_refused_as_its_named_runtime_fact
(replacing an_explicit_imageblock_kernel_is_refused_as_its_named_runtime_fact) makes a4_imageblock_extent's
state, reads its imageblock length as Gap::ImageblockLength, gets no dispatch_variant key, and has
one 4 by 2 threadgroup's dispatch refused as Gap::KernelInput of RuntimeFact { fact: "ImageblockSize" }.
|
||
|
|
a916e61185 |
Runtime: a kernel's [[stage_in]] is fetched; the three forms not built are Gap::StageIn by kind
A compute pipeline state whose kernel reads [[stage_in]] attributes was refused at its creation as Gap::KernelInput of KernelInputKind::StageIn, which a guest met (a descriptor-form compute state, the app's context closed right after). The translator already fetches every attribute in the shader from the buffer slot at its layout's bufferIndex, through that slot's pushed address, by the stage-in and dispatch regions the encoder already pushes. Two things stood in the way, both in the runtime: - interface() refused any kernel whose PipelineInterface::stage_in is non-empty. The line goes. - The thread-position fetch's reach check reads SpecKey::StageInReach, which the runtime's constant loop refused as a specialization it does not set. The runtime now leaves it at the module's default (true): one pipeline, the check kept for every dispatch. What stays refused is a typed refusal naming its own form, Gap::StageIn of a new StageInKind: - IndirectRegion: setStageInRegionWithIndirectBuffer:indirectBufferOffset:, now the method ComputeCommandEncoder::set_stage_in_region_with_indirect_buffer, which always refuses (the conformance rt side calls it in place of its own Unavailable); - DynamicStride: an attribute the kernel reads through a thread-position layout of MTLBufferLayoutStrideDynamic (the compute encoder has no attributeStride setter), at the state's creation, before the translator's IdentityDomains refusal of StageInStride; - IndexedStepRate: an attribute it reads through an indexed step at a step rate past 1, at the state's creation. Both creation checks read the descriptor narrowed to the attributes the kernel reads (kernel_inputs_read), so an attribute it never reads, and a constant step of a dynamic layout, refuse nothing. KernelInputKind::StageIn is deleted. Consumer search: `git grep -n 'KernelInputKind'` in the reims-vgpu checkout at c8201ec2ba: 0 hits (nor any for `StageIn` as a refusal kind). Tests: the device test every_device_fetches_stage_in_by_each_step_function dispatches engine/kernel_stage_in's stage_in_fetch under ThreadPositionInGridX at rates 1 and 2, ThreadPositionInGridXIndexed and Constant, and checks every thread's four attributes (threads past the region read its last element); without the change the state is Gap::KernelInput. every_device_refuses_each_unbuilt_stage_in_form_by_its_kind holds the three kinds and the two states that are made. kernel_input's refusal test of StageIn goes; lowered and the harness's gap test take Slot. The conformance case stage-in-region-clamps carries on past a refused row (probe, as attribute_formats does), so its 27 other rows compare where the indirect one is refused. The ledger drops the 82 rows of the old refusal (stage-in-region-clamps 1, attribute-format-fetches 29, attribute-format-class-crossings 16, stage-in-unread-attributes 36), takes the indirect row's new refusal, and the four compute attribute-stride rows' DynamicStride refusal. The validation requirement KernelStageInput stays: the engine's run through the runtime passes no stage-input descriptor or region. README, REFUSALS.md, METAL-COVERAGE.md, CONFORMANCE-COVERAGE.md and the signatures table regenerated. |
||
|
|
a7dd2e846e |
Translator: the binder's plan goes, with everything only it reaches, and the TexelRows and YCbCrInPlace forms
The runtime never made a plan (it binds each draw and dispatch by the pipeline's interface), and since the census digests each pipeline's content alone (two commits back) nothing in the tree calls one. What only the plan reached goes with it: - bind: BindState, BindShape and their shapes, BindingPlan and its instantiation (DispatchCommands, DrawCommands, push, descriptor and root-table templates and writes), plan.rs and plan/ (compute, resources, slots), instantiate.rs, resident.rs, the neutral resources' plan side, the heap's member planning and table bytes, the mesh arguments pass (MeshArguments, MeshArgumentsForm, fold_object_grid, metal_object_grid), ExecutionStatus and StatusBits as public items, TextureShape::Buffer, IndirectRef with the four indirect call variants (Dispatch::ThreadgroupsIndirect, DrawCall::Indirect, PatchesIndirect, MeshThreadgroupsIndirect) and IndexBufferRef::fetch_end. Dispatch, DrawCall and IndexBufferRef stay: validation states its cases' calls with them. - error::BindError leaves the public surface; a crate-private BindError of three variants stays as the error of the heap's view derivation, which lower::texture::slot's storage-read check reads (bind::heap::tier_read_gaps). That check keeps only the storage view's format: the sampled-view branch and ImageViewDesc were reached by the plan alone. - vk::DrawCommand, the plan's draw output. - pipeline: ComputePipeline::plan, RenderPipeline::plan; cache: VariantKey::covers and large_buffer_form. - The TexelRows form (bind::texel_rows, LoweringInputs::texel_rows, RuntimeFact and PushField TexelRows) and the YCbCrInPlace form (bind::ycbcr_in_place, lower/sampler/in_place.rs, LoweringInputs::ycbcr_in_place and ycbcr_planes_sampled, RuntimeFact and PushField YCbCrInPlace, PrecisionNote FloatSampleFilter and HalfSampleFilter, Routine::Quad). Only the binder set those inputs. - The tests of the deleted items, and the plan halves of mixed tests. Of 6810 tests (`#[test]` functions in the workspace) 309 leave and 11 come in their place: the lowering halves of mixed tests, kept without the plan (the heap layout, the stage-in stride and region facts, the emulated-simdgroup and bicubic facts, the iris-xe storage classes), and the kept tests of the two renamed files. 50 others are edited to drop a plan half or a deleted item (the api_surface round trips; the simd_emulated, extended-range, recursion, dynamic-root, handles, heap-storage-read and mesh lowering cases). 6512 remain. engine_graphics_binder.rs and engine_heap_binder.rs keep one and two tests and are renamed engine_unattached_colors.rs and engine_heap_groups.rs. - The runtime guard test's list of files the runtime inputs reach without being inputs drops the seven no input reaches since the cut: cache/digest.rs, lower/simd/divergent.rs, lower/simd/workgroup.rs, pipeline/artifact.rs, pipeline/layout.rs, pipeline/stage_io.rs and pipeline/vertex.rs; three of its reasons that named the plan or the binder say what reaches the file now. 559 public items leave (api_signatures.tsv: 55 structs, 26 enums, 140 variants, 245 fields, 52 methods, 24 associated constants, 7 constants, 5 functions, 5 impls). Consumer search, the consumer's development at 92ffbed817, `git grep -w NAME` of each of the 112 removed names: 0 hits for 105; the others are the consumer's own items: TessellationFactors 4 (its Bound::TessellationFactors), YCbCrMatrix 3 (its own string and doc), texel_rows 2 (its own fn), ThreadgroupsIndirect 6 (its own Dispatch enums and rt::Dispatch::Indirect), DrawIndexed 1 (a doc naming MTLIndirectCommandType values), covers 109 and plan 105 (generic words; the `.covers(` calls are its Extent's, the `.plan(` calls its video encoder's rate.plan). Its one import of metal2vulkan::bind is the argument-buffer layout types, which stay. The forms' audit. A texture over a buffer: the runtime's tests::over::every_device_holds_a_texture_over_a_buffer_in_place. A two-plane YCbCr sample: no runtime test; the runtime makes no texture of a two-plane YCbCr format (Gap::TextureFormat, the runtime README's "A format is made where the translator's format table maps it" row), the conformance cases ycbcr_gathers and ycbcr_textures record Metal's answers, and known-gaps-rt.tsv lists the runtime's refusals (ycbcr-gathers-*, ycbcr-texel-reads-420v). Versions: - RUNTIME_VERSION 2550: it covers plan instantiation and the binder's run-time data. Nothing calls those since step 2: the runtime never used the binder, and the own-context executor is gone. A run of an unchanged artifact does nothing different, so the guard hash (runtime-sources.sha256) moves alone, and the RUNTIME_VERSION doc is rewritten to name what it still covers. - SEMANTICS_VERSION 2273: no output changes for any input that still exists. The TexelRows and YCbCrInPlace forms, their facts, push fields and the two notes were reachable only through LoweringInputs::ycbcr_in_place, ycbcr_planes_sampled and texel_rows. Only the binder set those; the runtime sets none. The function key appended each of them only when set, so every surviving key hashes the same bytes. Two type declarations stay where they were, so module words do not move: bool in the bicubic types, uvec4 in the bicubic routines. Byte-identical modules are expected, not verified here; the 252-row hash probe is the check. - ARTIFACT_FORMAT_VERSION 591: the codec tags enum variants by name. The removed RuntimeFact, PushField and PrecisionNote variants leave their tags unused, which cache/mod.rs's rule says needs no bump: an old entry holding one fails to decode, which is a miss. No codec_struct field is removed. That is why SamplerDesc.ycbcr stays. The guard hash (crates/metal2vulkan-validation/runtime-sources.sha256) moves for the bind/ sources this deletes and edits and for vk/draw.rs, which leaves its list. No run of an unchanged artifact changes: what stays in bind/ computes what it did (the heap's tier check takes the same storage format; its removed sampled branch had no caller). Docs: docs/API.md (section 5 is the interface; the binding and plan sections go), README.md, docs/ARCHITECTURE.md, docs/HOWTO.md, docs/VALIDATION.md, the runtime README's DrawInput and identity-domain rows, docs/REFUSALS.md (regenerated; the binder's section goes), api_reference.md, api_signatures.tsv (blessed: removals only), tests/api_surface.rs, the signatures floor (5000), the bind modules' own docs, and the public field docs of PushField, RuntimeFact and SpecKey that named BindState, BindShape or BindingPlan. AGENTS.md: the project table names pipelines and their interfaces, not binding plans; its "core lives in" line stays true (bind/ still holds what the lowering reads). Verified on 31692939d4, this commit's tree (steelbrain/cutbinder-probe-6): job m3-max-68107, fmt, signatures, refusal surface, clippy -D warnings (workspace plain, --cfg m2v_gpu, --cfg m2v_cpu_icd; the translator with no feature and with each alone; the AIR crate alone), workspace Rustdoc -D warnings, each crate's private intra-doc links at 0, api-docs; job m3-max-68109, the product, validation and conformance suites, doctests, and on lavapipe the validation and runtime suites under --cfg m2v_cpu_icd, the conformance replay and the public cases' qualification. |
||
|
|
d9077dfa0d |
Push window: each device's maxPushConstantsSize sizes it, up to 256 bytes (rule 2's ninth form)
What: the push window is one value per device, `DeviceProfile::push_window`, the description's
maxPushConstantsSize up to 256 bytes, decided in the profile `Device::from_queries` derives
(device/profile.rs:115). Every window reads it: push placement (`lower::push::window`, `place`,
`spills` and `check_floor` take its bytes; lower/select.rs, lower/access/mod.rs and
lower/access/table.rs pass it), and in the runtime the one pipeline layout's push range
(device.rs:688), the kernel and render pipelines' push checks (pipeline.rs:2119, render.rs:1043)
and the encoder's push bound (encoder.rs:1759). With W that value, a kernel pushes in [0, W), a
vertex function in [base, W - 8) and a fragment function in [base, W); object and mesh functions
keep 0..32 and 32..64. A stage's fields past its window spill to its parameter block, whose
address the window holds, as they did past 256. `from_queries` refuses a maxPushConstantsSize
below 128, Vulkan's least, only (`Unsupported{PushWindow}`, required 128), and the runtime's
floor no longer lists maxPushConstantsSize (floor.rs: its row and PUSH_CONSTANT_BYTES go; the
layout's range was a constant 256). There is no constant 128 path, no switch and no environment
gate: the limit query is the only input. Ported from the held branch steelbrain/amdfloor-window
(d6880ca16b) onto today's development, every line reference confirmed against this tree.
Why: the owner's word choosing option B. A device reporting 128 bytes was refused by the floor;
it now runs with a window of 128.
AGENTS.md rule 2 takes the owner's authorized text: "for eight only" becomes "for nine only",
and the push window joins the list after run-time texel offsets.
Known gap (runtime README, Known gaps of indirect command buffers): in a window of 128 bytes a
command reaches 9 vertex slots, and 8 where the vertex function spills, against 25 and 24 at 256
((W - 8 - 16 - 28) / 8; from code: lower::push's
an_indirect_draw_s_vertex_function_pushes_25_or_9_slot_words). A kernel pushes 8 buffer
addresses beside its dispatch region at 128 bytes against 24 at 256, the rest from its ring.
Caches: a device of 128 and one of 256 share no cached artifact and no pipeline. The profile's
fingerprint hashes every ProfileFields field by Debug (device/profile.rs:312, :327), the limits
included (:346, maxPushConstantsSize at :625); `function_key` hashes the fingerprint
(pipeline/compile/key.rs:182, :189; passed at pipeline/compile.rs:2973), as does
`queried_render_descriptor_key` (key.rs:546); a cached artifact or pipeline loads only under an
equal fingerprint (cache/artifacts.rs:71, :204, :238; cache/envelope.rs:142); and the runtime's
enables digest, which the stage keys check, hashes it (metal2vulkan-runtime/src/device.rs:1533).
SEMANTICS_VERSION stays 2273: no module changes under an unchanged key. Every device
`from_queries` accepted before reports 256 bytes or more (it refused below 256), so its window is
256 as before and its modules are the same bytes; a device of fewer bytes was refused, so it
holds no artifact to go stale, and its modules are new under its own fingerprint. The golden
test at this tree found 0 cells changed under an unchanged key over the 15 committed profiles,
and 1855 under a changed profile fingerprint, runtime-floor's column alone (m3-max-68089; the rows
whose assembler Linux lacks are not observed there).
Golden table: runtime-floor.json and its generator drop the floor block's maxPushConstantsSize
of 256, so the profile reads Vulkan 1.3's least, 128, and its fingerprint moves. Its cells are
re-blessed on development (the bless needs macOS's assembler).
Validation: runtime-sources.sha256 is rewritten (d4a8dbf2...), since device/derive.rs and
device/profile.rs are runtime inputs the guard hashes.
Docs: the runtime README (the floor's limits note and table, compute Parameters, the render push
range, the indirect command buffers' known gaps), docs/API.md section 5 and the from_queries
paragraph, PushWindow's doc, reach.tsv and docs/REFUSALS.md (regenerated; the PushWindow row
only), the device profiles' README, and api_signatures.tsv (DeviceProfile::push_window). The
api_surface table is unchanged: no public type is added.
Tests: lower::push's placement at 256 and 128; from_queries (each committed profile's window is
its limit up to 256, runtime-floor's 128; 128 derives, 64 is refused with required 128); the
tessellation control range, the engine identity and spill tests in each profile's window; and
the runtime's push_window, patch and indirect token tests in two arms each, the device's own
limit and the limit held at 128 by the tests' device shim (tests/command.rs push_window_128,
DeviceOptions::described).
Verified:
- m3-max-68088 (this tree): fmt, the signatures table, the refusal surface, clippy -D warnings
plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings: each exit 0. The
runtime suite on lavapipe (--cfg m2v_cpu_icd): 647 passed, 3 skipped. Its push lines read
"push_window: the push window is 256 bytes", "push_window_128: the push window is 128 bytes",
"window 128, 12 buffers: 3 ring writes and 3 pushes over 3 dispatches", "icb_tokens: ... the
push window 256 bytes, 25 slot words", "icb_tokens_128: ... the push window 128 bytes, 9 slot
words", and draw_patches_full_range at 256 and _128 at 128.
- m3-max-68089 (this tree): the core crates 3881 of 3882 passed, 24 skipped; the one failure
is the golden table, stale under runtime-floor's moved fingerprint (1855 cells, one per row
observed on Linux, 0 new, 0 gone, 0 under a changed source, 0 changed under an unchanged key).
Validation 1314 passed, 3 skipped. The translator's push tests print each committed profile's
window: runtime-floor 128, the vertex function ending at 120, 9 inputs; the 14 others 256.
- m3-max-68067: the whole runtime suite on lavapipe at an earlier tree of this change
(a98af765ad, before the rebase onto
|
||
|
|
c1bcce40f5 |
Validation: the drm-shim recipe goes, with its image, its wrapper and its test
The runtime does not open the drm-shim devices as a guest's device (step 0's P2, ruled: the shim has no venue), so the corpus-pipeline kernel rows that now run through the runtime have no drm-shim sweep, and nothing else used the recipe. Gone: scripts/drm-shim.Dockerfile, scripts/drm-shim-exec, scripts/linux-gate's `--recipe drm-shim` with its `--driver` and `--chip` (and `--recipe` itself, which had only `gate` left), scripts/linux-gate-vulkan's shim ICD block, and the integration test tests/integration/drm_shim.rs. Driver acceptance on RADV, ANV and NVIDIA stays on the real cards. Search at this commit: `git grep -n -i -E 'drm.?shim|M2V_DRM_SHIM'` gives 0 lines; `git grep -n -e '--recipe'` gives 0. The consumer has no copy of these scripts (they are not part of a published crate). (cherry picked from commit 59693588b00825ed312beb67841fe5b8352a6508) |
||
|
|
0702b43baf |
Translator: a kernel's partial-threadgroups variant that cannot be made is refused as PartialThreadgroups
Every refusal of the partial-threadgroups variant (LoweringInputs::partial_threadgroups) named Feature::GpuEncodedIndirectCommands, the feature of indirect command buffers a kernel encodes, which none of them is. A new feature, Feature::PartialThreadgroups (NotImplemented), names them all: - lower/select.rs (finish): the kernel's simdgroups run on the emulated tier (its profile's subgroups, its lockstep order or its pinned widest mode give it that tier), whose exchanges are not walked past the grid. This is the one a SIMD-group or quad-group kernel meets on a device whose subgroups are narrower than 32 (lavapipe, and the Iris Xe in the equality test). - lower/simd/divergent.rs (barriers): a kernel whose uniform barriers need a vote word its stage's workgroup memory cannot hold beside its static arena. - lower/mesh/mod.rs (plan_partial_groups): a tile function, a kernel that reads a stage-input region, one with compute derivatives or a cooperative imageblock slice write. - pipeline/compile.rs (analyze_one): the input beside flat_grid, folded_groups, replay_bindings or emulated_simdgroups. Its condition was one with the folded and call-threadgroups combinations, which stay GpuEncodedIndirectCommands; it is split in two. Today the four sites build the same refusal with no symbol, so no text tells the causes apart, and none is added. The flat variant's refusal at lower/select.rs:1715 (flat_grid with call_threadgroups, on the emulated tier or with a workgroup synchronization) stays GpuEncodedIndirectCommands: it refuses the flat variant, not the partial-threadgroups one, with the flat variant's other refusals (lower/access/mod.rs plan_replay, pipeline/compile.rs analyze_one); the runtime never sets flat_grid (no hit in crates/metal2vulkan-runtime/src). The runtime's test of a refused variant (pipeline.rs, the non-observer's lowering) matches the new feature, so a variant refused now is still kept as a refusal and its state runs the plain module. A refusal kept in a device's cache directory before this commit still reads: the marker (cache.rs REFUSED) holds no feature, and it is found by the variant's key (function_compile_key), which this commit does not move. No version moves. No persisted outcome records the moved refusals' class: - the runtime's cache directory: the marker above, under an unchanged key; - the golden tables (golden_hashes.tsv, 77 GpuEncodedIndirectCommands cells; public_fixture_expectations_engine.tsv, 96): every subject compiles under no inputs, where partial_threadgroups is false, and every moved site is reached only under it; - the authored compile census (corpus/authored-compile.tsv): no GpuEncodedIndirectCommands cell; - the committed observations, cutover lists and conformance recordings: no hit (git grep -c over corpus/, cutover/ and crates/metal2vulkan-conformance). The runtime guard's inputs do not change: every file edited here is outside them or on the guard's list of compile-time files. The consumer: git grep -n 'GpuEncodedIndirectCommands' cae6d420df in its checkout gives 0 lines (and 0 for PartialThreadgroups). docs/REFUSALS.md is regenerated (scripts/refusal-surface/refusal_surface.py), with the new row's reach mark in reach.tsv (app: a dispatchThreads grid that is not whole threadgroups), and the signatures table (api_signatures.tsv) has the new variant (signatures.py --bless); the api_surface table lists Feature as an enum, not its variants, so it does not change. docs/API.md section 5 and the partial_threadgroups input's doc name the new feature. The translator's partial-threadgroups tests assert it. |
||
|
|
5e3477e60a |
Translator: a buffer slot takes the storage view on every profile; the uniform view goes
A buffer slot took a uniform view only where containment was the device's (contain::encoding gave Check::None, under robustBufferAccess or robustBufferAccess2): the uniform arm of the slot's view choice and Profile F's per-stage storage-buffer fallback. The runtime enables neither feature, so no runtime module took one. The next commit deletes the robustness choice; memory, lower and spirv are crate-private, so its dead_code would fail that commit on its own. The uniform view goes first, with everything that only it reached: - the uniform forms of a view (UniformWords and UniformVec4) and their reads, and Profile F's fallback (fallback_view, fallback_rank). Profile F (runtime-floor without device addresses, below the runtime's floor) now refuses a stage past maxPerStageDescriptorStorageBuffers as DescriptorCount, where before it read its read-only slots through uniform views, under robust descriptors only; - SlotPlan::lane_read and its planner pass, and Uniformity::among_active_lanes, which only that pass ran; - the storage-view variant: LoweringInputs and VariantKey storage_view_slots, the binder's storage_view_variant and large_view_candidates; - RuntimeFact::UniformViewAliasing and UniformViewRange with UniformViewChoice, and the binder's aliasing check with its refusal BindError::UniformViewAliased (docs/REFUSALS.md regenerated: binder refusals 9 to 8); - SpecKey::RangeAtBindOffset (only uniform views declared it), BindState::view_base_alignment and uniform_views_at_residual, StageTable.at_bind_views and StageTable::class_alignment; BoundBuffer::shape, BoundBuffer::same_shape and StageTable::shape lose their view_base_alignment parameter; - BufferRanges.uniform: BufferRanges::length_class and the binder's offset alignment now read maxStorageBufferRange and minStorageBufferOffsetAlignment alone. Nothing in the runtime crate reads BufferRanges, BindState, BoundBuffer, StageTable or BindShape (git grep: 0 hits); it reaches validation's candidate engine only; - AccessClass::Uniform, DescriptorView (Storage, UniformWords, UniformVec4) and BufferForm::uniform_view; BufferForm::Descriptor loses its DescriptorView field. The loop hoist stays: the argument table's Uniform block (lower::access::table, the spilled push fields) still feeds it. Its docs no longer name a buffer slot's uniform view. Removed or changed public items and the types that own them, each with 0 hits in the consumer's checkout at bd9d6ae85a and at ad28ebd881 (git grep -w -F over *.rs, *.toml, *.md): DescriptorView, UniformWords, UniformVec4, UniformViewChoice, UniformViewRange, UniformViewAliasing, UniformViewAliased, RangeAtBindOffset, storage_view_slots, view_base_alignment, uniform_views_at_residual, at_bind_views, class_alignment, uniform_view, same_shape, AccessClass, BufferRanges, buffer_ranges, BufferForm, StageTable, BoundBuffer, BindState, VariantKey, LoweringInputs, RuntimeFact, SpecKey, BindError. crates/metal2vulkan/tests/api_signatures.tsv and api_surface.rs are blessed in this commit, and docs/API.md (the uniform-view form, the bind-offset key, BufferRanges) changes with it. Stored: VariantKey's storage_view_slots, and the codec tags of BufferForm::Descriptor (no field), SpecKey (RangeAtBindOffset gone), RuntimeFact (two variants gone) and DescriptorView (gone). The batch's ARTIFACT_FORMAT_VERSION bump (590 to 591), applied last once for the batch, covers them; no version moves here. Tests deleted whole, neither a containment proof: engine_storage_view_variant.rs (the variant's fixed point) and engine_lane_reads.rs (the uniform view's lane choice). Deleted with the forms they tested: the uniform-view cases of engine_access.rs and engine_binder.rs, the slots tests of the large-view candidates and the bind-offset range, the variant's cache round trip, and the active-lanes tests of lower/simd/uniform. The kept containment proof, a constant buffer shorter than its window, runs on the storage form (a_constant_buffer_shorter_than_its_window_is_contained_in_shader). Profile F's new refusal has its test (a_stage_past_the_storage_buffer_limit_without_device_addresses_is_refused). Golden: at the batch's top only the stated set's 24 texel-buffer rows moved, the 312 cells commit 2 alone moved before the rebase; no other row moved on either set. The .air.ll half (567 typed-pointer fixtures, which need metal-as) is unchecked per commit; the batch's golden bless on the M3 covers it. Verified: - On unshipped's tip before this rebase (96d953bb0b), the same change: compile job m3-max-66120 green (fmt, signatures, refusals, clippy plain, m2v_gpu and m2v_cpu_icd, workspace Rustdoc, api-docs). Before that rebase, this commit alone (hash probe job m3-max-65979) read 252 rows equal to its base's arm. - At the batch's top on 96d953bb0b (all four commits, probe job m3-max-66130): the hash probe's 252 rows equal unshipped's arm at 4861c9863d (m3-max-65976); the golden probe's set without buffer robustness (the runtime's state) equals the base arm 96d953bb0b (m3-max-66128), 1855 of 1855 rows. - The states-only play at the batch's top (render and compute states made and refused, pipelines_created, made_ahead_variants) is the coordinator's, run on the branch; it is not evidence here. - Here: cargo fmt; signatures check; refusal surface regenerated. The compile job follows on the branch tip. |
||
|
|
4aee2fa9f1 |
Translator: the ordered fetch form goes; its computed writes are refused on every device
The framebuffer fetch had a second form chosen by rasterizationOrderColorAttachmentAccess: over
a rasterization-order input attachment, a fragment function computed writes no Vulkan blend,
write mask or logic operation gives. No runtime enables that feature, so the form ran on no
guest's device. It goes (rule 2: a second form chosen by a query outside the named list; rule 4).
What changes:
- A fetch reads its input attachment ordered between draws alone on every device, noted
UnorderedFetchWithinDraw. Under the identity domains it reads the pushed texture
(PushField::FetchedColor).
- These states are refused on every device: a padded extended-range attachment's blend; a write
of some of the codes one word of an extended-range attachment holds; and a blend no Vulkan
state gives on a rotated (ARGB8Unorm) attachment. Each refusal is FramebufferFetch, not
implemented (lower::fragment::fetch::computed_write_refused).
- A word attachment under a partial mask takes its format's own attachment, and is refused where
the device lacks that format.
- A private logic operation on a device without logicOp is refused naming
PrivateRenderState(LogicOperation) and logicOp.
- Deleted: lower/fragment/input_blend.rs, word_input.rs, the shader logic operation in logic.rs,
lower/arith/extended_range/blend.rs, pipeline/link/fetch.rs, and the arithmetic only they used
(the fma emulation cluster, div_exact, encode_keeping).
- Deleted public items:
- LoweringInputs.framebuffer_fetch and .logic_operation;
- FramebufferFetchInputs, FetchedAttachment, BlendEquation;
- GraphicsState.rasterization_order_attachment_access and
FragmentCaps.rasterization_order_color_access;
- metal::format::extended_range_blend, Feature::ExtendedRangeBlend and the ExtendedRangeBlend
enum;
- RuntimeInput::FramebufferFetch and ::LogicOperation;
- RuntimeFact::ExtendedRangeInputBlend, ::RotatedInputBlend and ::WordInputMerge;
- PrecisionNote::ExtendedRangeBlendSource and ::ExtendedRangeFloatBlendSource.
- The enable-set facts class VK_EXT_rasterization_order_attachment_access as described and never
enabled.
Docs, in this commit:
- rt README: Known gaps of render encoders gets one line per refused state, each built on the
runtime's own fetch form if a guest meets it. The Not-enabled row of
rasterizationOrderColorAttachmentAccess goes, and so does logicOp's mention of the shader form.
- docs/API.md loses the two blend-source notes from the precision-note catalogue, the
rasterization-order form and the word merge.
- REFUSALS.md is regenerated (reach row of ExtendedRangeBlend removed), along with
api_signatures.tsv and the api_surface table.
- The conformance ledger: the 39 rows refused naming rasterization-order access (on llvmpipe and
the UHD 630; on other venues the case read as lacks-feature) become 22 every-venue rows,
refused, needs NotImplemented. The matrix replay on development confirms the scope.
Lines: product sources (crates/metal2vulkan, -air, -runtime src, tests excluded) +238 -4647;
product tests +277 -2279; validation and conformance +61 -182; docs +48 -67.
Consumer search (reims-vgpu at 71573a84c8, git grep -w over *.rs, *.toml and *.md):
- 0 hits: ExtendedRangeBlend, rasterization_order_color_access, BlendEquation,
FramebufferFetchInputs, rasterization_order_attachment_access, framebuffer_fetch,
extended_range_blend, ExtendedRangeBlendSource, ExtendedRangeFloatBlendSource,
ExtendedRangeInputBlend, RotatedInputBlend, WordInputMerge, DualSource.
- Hits that are not these items: FetchedAttachment 2 (rt's DrawKind); logic_operation 8 (its
own structs and rt's private state).
- RuntimeInput: only LinkedFunction is used.
- No glob import or re-export of a metal2vulkan module (only `use metal2vulkan_runtime as rt`).
Verified: cargo fmt; refusal surface and signatures regenerated locally. The compile job and the
host suites follow on the branch.
|
||
|
|
3f8f9d352d |
Translator: the grammar items drop FPEncoding, which no 8-bit float type names
The native 8-bit float deletion left spv.rs's FPEncoding (Float8E4M3EXT, Float8E5M2EXT) unused, which clippy refuses (dead code). items.txt drops the enum and spv.rs is regenerated from SPIRV-Headers vulkan-sdk-1.4.341.0; the test parser's table.rs regenerates unchanged. Found by clippy in compile job m3-max-65654. |
||
|
|
87b78f0ebd |
Translator: the grammar items drop the two execution modes nothing emits
The sample interlock and the post-depth coverage deletions left ExecutionMode::SampleInterlockOrderedEXT and ::PostDepthCoverage unconstructed, which clippy refuses (dead code), and the interlock serializer test looping over one mode. items.txt drops the two values and spv.rs is regenerated from SPIRV-Headers vulkan-sdk-1.4.341.0 (an unchanged regeneration reproduced the committed spv.rs and table.rs byte for byte first); the test builds its one mode directly. Found by clippy in compile job m3-max-65620. |
||
|
|
3d8e01d2c2 |
Translator: the coverage after the depth tests is refused on every device; its lowering goes
[[sample_mask, post_depth_coverage]] read SampleMask under the PostDepthCoverage execution mode where a profile enabled VK_EXT_post_depth_coverage, and was refused as needing the extension elsewhere. The runtime never enables the extension, so it refused every such function all along, and nothing ever executed the lowering: no test runs it, and the golden tables only compile it. It goes to a typed refusal, Unsupported::not_implemented(Feature::PostDepthCoverage), at the parameter's plan; the IR's ExecMode::PostDepthCoverage goes with its builder, serializer and requirement arms, and the enable-set facts class the extension as described and never enabled. The AIR decode of the parameter (Builtin::PostDepthCoverage) and the SPIR-V and Vulkan vocabulary stay, the decode being what the refusal reads. The refusal moves from a device's to ours: Feature::PostDepthCoverage's doc, its reach mark and docs/REFUSALS.md (regenerated) say every device. The runtime README's known gaps of render pipeline states gain its line: refused on every device, built on the extension with its tests if a guest meets it. Class 3 of the planner's rule (a sole lowering under 150 lines that nothing executes). No public item goes (signatures.py --check clean). The consumer's checkout (reims-vgpu at bd9d6ae85a) names it once, Metal's supportsPostDepthCoverage in a guest test's protocol member list, not an item of ours. Product lines: +15 -34. The golden tables' pdc_after rows move from compiled to refused on the profiles that enabled the extension (re-stamped at the pin); no SEMANTICS bump (the refusal changes no module that compiles). |
||
|
|
c5209e66ba |
rt floor: alphaToOne is enabled where the device reports it, no longer required
A user's Radeon under AMD's own Windows driver was refused at device start, partly because it
reports no `alphaToOne`. The feature leaves the floor's required features and joins the tables
device creation enables where the device reports it (`floor::ALPHA_TO_ONE`, beside the min-LOD and
fill-mode ones). Nothing else changes. Where the device reports the feature, creation enables it,
the translator's description states it, and a render pipeline that sets `alphaToOneEnabled` takes
the device's own `alphaToOneEnable`, as before. Where it does not, the translator's existing typed
refusal applies: `Unsupported{AlphaToOne, Feature(AlphaToOne)}` from `link::graphics_state`, already
in docs/REFUSALS.md, which `refusal_surface.py` regenerates unchanged. This change adds no other
form, in the shader or elsewhere.
- floor.rs: `ALPHA_TO_ONE` in `ENABLED` and in `decide()`'s reported-copy chain; `REQUIRED` loses it.
- rt README: the Features row moves to its own "Alpha to one" table, and a known-gap row under
render pipeline states. 0 of the 58,976 render states of the nine standard streams set
`alphaToOneEnabled`, and 0 set alpha to coverage (states-only plays plus dumps on lavapipe, job
m3-max-66153).
- runtime-floor.json and its generator lose `alphaToOne` from the m2v_runtime_floor block, which
`the_floor_profile_states_exactly_the_floor` holds equal to `REQUIRED`.
- Tests: `the_alpha_to_one_feature_is_enabled_where_reported` (decide and shader_enables, with
and without the feature); `at_the_floor` no longer reports it; the missing-feature list drops it;
the README table check covers the new table. The device test
`every_device_draws_lines_under_alpha_to_coverage_or_one` expects the typed refusal on a device
without the feature. The translator test `alpha_to_one_is_refused_only_without_the_feature` reads
`runtime-floor` as it is.
Honesty line: no AMD card runs Windows in the lab. On that driver this is expected, not verified.
This commit says what the code now does; it does not say that user's device now starts.
Verified: see the compile job named in the landing message.
|
||
|
|
072eaaba18 |
profiles: delete amd-rdna3-radv, whose every cell is the Radeon 780M's
What: the RX 7900 XTX capture amd-rdna3-radv derives the same translation fingerprint as amd-780m-radv: the Radeon 780M and the RX 7900 XTX under one RADV build. So every golden and census cell of the profile equals the 780M's ( |
||
|
|
591f813569 |
REFUSALS.md: a rate map outside the compile's measured bounds is ours
docs/REFUSALS.md section 4 showed '-' for its five rows (UnpinnedCompile: ScreenExtent, LayerCount, DenseSamples, SampleOutOfRange, SampleCount). The code says the basis: each is built in one place, `RasterizationRateMap::new` (bind/rate_map.rs), through `RateMapError::Unpinned`, which refuses a descriptor outside the bounds where Apple M3's compile was measured, and the enum's own doc states "The bounds are this crate's, not Metal's". So the script derives `ours` for the section, as it does for the translation caps and the deadline. No row of another section moved. Every section's '-' total is now 0. Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass. |
||
|
|
dd150e4f46 |
Delete the 14 Feature variants and 3 Needs variants nothing builds
Nothing in the product crates built these 14 Feature variants: SamplePositions, TextureSize,
TextureSampleCount, TextureView, MipmapGeneration, HostMemory, GpuTimes,
ViewFormatReinterpretation, SeparateMultisampledDepthStencil, SparseTextures,
TimelineSemaphores, HeapTextureTiling, UndeclaredTextureUsage and RenderTargetSize. They were
refusals of the runtime this tree cut over from, and so they were docs/REFUSALS.md's last 14 '-'
rows. Nothing built the Needs variants DeviceCapability, MetalGpuFamily and MetalRefuses either,
nor called their constructors Unsupported::device_capability and Unsupported::metal_gpu_family
outside tests. No doc or test showed one to be the vocabulary of a Metal refusal anything
answers: the three Feature docs that said the runtime answers MetalGpuFamily or MetalRefuses
were corrected in the previous commit.
Searches:
- The tree, outside the definitions, the reach rows and the generated tables:
- Feature::SeparateMultisampledDepthStencil in one translator test
(bind/depth_stencil_copy/tests.rs), now Feature::StencilExport, since
depth_stencil_copy_modules refuses with whatever feature its caller names;
- Feature::SparseTextures, SparseNeed and Unsupported::device_capability in one conformance
test of verdict::device_gap_of's DeviceCapability arm. That test pinned a chain from the
runtime's `sparse_refusal`, which no longer exists, so the test and the arm go together;
- Unsupported::metal_gpu_family and the three Needs variants in error/tests.rs
(one_of_each and the retry table);
- the golden and public-fixture tables' refusal cell (golden_hashes.rs, public_fixtures_engine.rs)
named the other Needs through a wildcard arm, now unreachable: the three arms are the cell;
- stale prose naming them in conformance cases/sparse_heaps.rs, probes/bgra4_write_and_mipmap.m,
the engine fixtures README and docs/API.md (its TextureSampleCount sentence now names the
runtime's Limit::TextureSamples, which refuses that texture);
- the payload enums SparseNeed and LinearNeed are used by nothing else, and go too.
The other hits for these names are other enums' variants (the runtime's Limit::TextureSize,
Refusal::TextureSampleCount, Gap::TextureView, ImportHandle::HostMemory, ...).
- The consumer's checkout at bd9d6ae85a: 0 hits for Feature:: with any of the 14, SparseNeed,
LinearNeed, Needs::DeviceCapability, Needs::MetalGpuFamily, Needs::MetalRefuses,
metal_gpu_family or device_capability( (its own `Piece::SamplePositions` and
`Piece::SparseTextures` and its own HostMemory types are unrelated).
Needs is now AnyOf, NotImplemented and NotRepresentable; Needs::basis answers Device, Ours and
Device for them. The script drops the two constructors and their condition texts.
docs/REFUSALS.md: section 1 is 119 variants, every one with a site and a basis (device 51,
ours 68, '-' 0). api_signatures.tsv: 35 records removed, all in metal2vulkan::error; the public
surface table loses SparseNeed and LinearNeed.
Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass;
signatures.py --check passes after --bless.
|
||
|
|
aecdc8ee84 |
profiles: amd-rdna3-radv is a capture of an RX 7900 XTX, with per-format sample counts
The RDNA3 census profile was a gpuinfo report (51898, an RX 7800 XT on Mesa 26.2.3). Such a report holds no VkImageFormatProperties, so the profile stated no color attachment format's own sample counts, only the device-wide framebufferIntegerColorSampleCounts, which RADV states as 1x. The authored compile census therefore refused integer color targets above 1x on that column (RasterSampleCount needs FramebufferIntegerColorSampleCount(N) | ColorAttachmentSampleCount(format, N)), 9 cells. amd-780m-radv, the same driver measured, compiles all 9, and the runtime on a real RDNA3 card queries each format's counts itself. The profile is now a local capture of a card we run, made as the other local captures are: `vulkaninfo --json` and its `corpus-vulkan --capture-formats` supplement on an AMD Radeon RX 7900 XTX (RADV NAVI31, Mesa 26.2.6, job m3-max-65462; device queries only), converted by scripts/regen-device-profiles (--offline, the pinned vk.xml). Its m2v_color_attachment_sample_counts states 70 formats, R32_UINT and R32G32B32A32_UINT among them at 1, 2, 4 and 8 samples. The SOURCES entry and the profiles README row say so; no venue names the profile. The c3 test that refuses a gpuinfo report under a venue now names amd-rdna2-apu-radv, a gpuinfo profile still. Bless items, at the next pin and not here: the golden table's amd-rdna3-radv cells (the profile's fingerprint moves), the authored compile census's amd-rdna3-radv column (the 9 sample-count cells are expected to compile, and other cells move where Navi31 under 26.2.6 states other features or limits than the old report), and the opened-chains pin's two amd-rdna3-radv contexts. |
||
|
|
7f156bc920 |
Error::basis answers a translation error from what its refusal needs
The runtime's Error::basis answered None for every Error::Translation, so each translator
refusal a guest met sat in a consumer's census unsorted between Metal's own refusal and our
gap, and 36 of the translator's 133 Feature variants showed no basis in docs/REFUSALS.md.
What:
- RefusalBasis moves to metal2vulkan::error; the runtime re-exports it at the same path
(metal2vulkan_runtime::RefusalBasis: its signature records do not move).
- Needs::basis: AnyOf, DeviceCapability and NotRepresentable are Device, NotImplemented is
Ours, MetalGpuFamily MetalDocumented, MetalRefuses MetalMeasured.
- metal2vulkan::error::Error::basis: a refusal's from its Needs; LimitExceeded, Budget and
Internal Ours; InvalidInput, InvalidDescriptor, NeedsInput and Cancelled None. Both matches
are exhaustive in the translator, so a new Needs or Error variant must answer (the runtime
could not match the translator's #[non_exhaustive] enums without a wildcard arm).
- The runtime's arm is `Error::Translation { error, .. } => error.basis()`.
- refusal_surface.py follows the helper a site hands its feature to (a front-end reference is
NotImplemented; the feature argument of a construction; a helper's argument; the enclosing
function's computed construction; a function that returns the feature, through its calls in
its file). Its kind-to-basis table is read from Needs::basis's arms. --check fails on a
variant with a site whose basis is not settled.
- docs/REFUSALS.md: the 22 variants with a site and no basis are settled, and their Where
cells filled; no other row's Where or Basis moved. Section 1's totals: device 51, ours 68,
'-' 14 (the 14 variants nothing builds).
- The docs of SimdgroupMatrix16x16x16, IndirectRenderState and GlobalBuiltinInFragment (and
three comments that repeated them) said the runtime answers them as Metal's own refusal; no
code does, and the translation refuses them NotImplemented on every device, so they say that.
Size, past the 200-line mark (hand-written lines, generated tables excluded): 272 added, 50
removed. The script +147/-12 (helper following and its call scan about 60, the Needs table and
derived basis 20, scan bookkeeping 25, the unsettled check 12, selftest cases 20, doc text 10);
the translator +63/-7 (21 of them RefusalBasis moved from the runtime, -23/+8 there); the
runtime test +44; docs/API.md +6.
Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass;
with unsettled() emptied the selftest fails; signatures.py --check passes after --bless added
7 records, all on metal2vulkan::error.
Verified: compile m3-max-65442 (fmt, refusal_surface.py --check and --selftest, signatures.py --check,
clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace Rustdoc -D warnings, scripts/api-docs);
host suites m3-max-65443 (metal2vulkan, -air, -runtime: 3969/3969, the golden hashes and the old
render key among them; doctests); before-run m3-max-65444 (development plus the new test alone):
a_translation_error_answers_the_basis_of_what_it_needs fails as expected (None against Some(Device)).
|
||
|
|
2b265713c8 |
matrix: two comments name the RTX 3090 by its link, not by its host
scripts/matrix/results.py (the per-process level note above HARNESS_ALONE) and its test in scripts/matrix/test_results.py named the 3090 of rounds |
||
|
|
e734db4be2 |
Runtime: the translator's description states every feature and extension device creation enables that it names; maintenance4 joins the floor
What: shader_enables, the enable set the translator's description of the device is restricted to
(DeviceDescription::with_enabled), now reads every table of features device creation enables
(floor::ENABLED: the floor, the portability subset, the optional features, the attachment
reads, step rates, min-LOD clamps, fill modes, quad control, the pixel interlock, barycentrics,
the border swizzle, linear attachments, fault reports, and the indirect commands' features, now a
table of their own, INDIRECT_COMMAND_FEATURES, which indirect_commands sets). Each entry the
translator names reaches it where creation enabled it. Entries that were enabled but unnamed now
carry the translator's name: depthBiasClamp, drawIndirectFirstInstance, bresenhamLines and
occlusionQueryPrecise (floor), attachmentFeedbackLoopLayout (the attachment reads),
borderColorSwizzle and borderColorSwizzleFromImage, and maintenance5 (indirect commands).
shader_extension names the extensions those need, and the others creation enables that the
translator names: VK_EXT_line_rasterization, VK_EXT_attachment_feedback_loop_layout,
VK_EXT_border_color_swizzle, VK_EXT_custom_border_color, VK_EXT_external_memory_host and
VK_KHR_maintenance5.
maintenance4 joins the floor (REQUIRED, the README's floor table, runtime-floor.json's
m2v_runtime_floor block and regen_device_profiles.py's RUNTIME_FLOOR): Vulkan 1.3 requires it
of every device, so no device at the floor lacks it. The translator's profile reads it for
spirv-val's --allow-localsizeid alone.
Why: the planner's feature-enable walk (lane texoff, 11-21) found these features enabled at
vkCreateDevice and absent from the translator's profile, the class maintenance8 was in before
|