f4eb47d7925f8ffcbbdd67d1a7c1cee0ddf66dc7
9875
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
da37e9e5df |
validation test: skip an input whose version the toolchain refuses as above its newest
Tally::refused now reads the input's own version and keys the skip on the toolchain's own refusal of it, compared with the version the toolchain says it takes: - typed AIR: the input's `!air.version` node, and `xcrun metallib`'s "air version set to X (...), but expecting Y". Skipped only where X is the input's version and Y is below it. - MSL: the source's `// metal-std:` standard S, and `xcrun metal`'s "invalid value 'S' in '-std=S'". Skipped only where every `metalX.Y` the compiler's notes offer is below S. Anything else stays a failure. finish lists each skipped input with both versions, then prints "SKIP <n> of <inputs> inputs above the toolchain's newest version". Over the public fixtures, 31 of 582 typed inputs state AIR 2.9.0 (545 state 2.8.0, the rest older) and 10 of 747 MSL sources name metal4.1. Those are the counts of the two refusals in CI run 46959260218 on macos-26 (31 and 10). On that runner, the two round trips should print "SKIP 31 of 582" and "SKIP 10 of 747" and pass. ci.yml is unchanged. The macos-26 arm64 image 20261123.0526.1 carries Xcode 26.0.1 to 26.6 (default 26.6) and SDKs up to macOS 26.5, so no Xcode on it takes AIR 2.9. |
||
|
|
55cca59b13 |
validation test: an input above the toolchain's newest version is skipped and counted (red)
On macos-26, CI's Xcode 26.6 refuses the public fixtures of AIR 2.9 and Metal 4.1, which come from the macOS 27 SDK: `xcrun metallib` says "air version set to 2.9.0 (...), but expecting 2.8" for 31 typed fixtures, and `xcrun metal` says "invalid value 'metal4.1' in '-std=metal4.1'" for the 10 sources that name metal4.1. typed_fixtures_round_trip and msl_fixtures_round_trip fail on them. round_trip_all now keeps each input's outcome in a Tally, whose finish lists every skipped input and the total above the toolchain's newest version. The tests own their inputs and need no Mac: a fixture of AIR 2.9 refused by a toolchain that states 2.8, and a source naming metal4.1 refused by a compiler whose notes offer up to metal4.0, are each to be skipped and counted; every other error (another metallib error, a refusal whose expected version is not below the input's or names another version, a refused standard the source does not name or that the compiler offers, any other compiler error) is a failure, and a failure fails the round trip. Red here: Tally::refused files every refusal as a failure, so the two skip tests fail. |
||
|
|
cffa762bda |
rt: a heap texture placed over another's bytes moves from undefined at its first use, not in an upload
A newer heap texture placed over an older one's bytes moved out of UNDEFINED in the upload ahead of its first command buffer. Vulkan lets that move write the image's memory (a compression state's initialization), and a command buffer that reads the older texture before writing the newer one then reads changed bytes, where Metal changes none. AMDVLK does this on a Radeon 780M (round job m3-max-79662, 1 of 915 failed; RADV and ANV pass). The ruled form, one form on every device with no device or driver key: no upload moves such a texture. Its first use moves it, in the command stream, after the earlier reads. - alias: a texture placed with links is unmoved (Placement::unmoved) as well as stale. A first use in a command buffer of a texture unmoved as it is encoded, a read included, adds a check at the head of its segment, as a first write already did. The segment ends first where a link was read in it. The submit thread resolves the check in queue order: a write's check moves a stale texture, and any check moves an unmoved one, which is then unmoved no more. - Each heap lists its unmoved textures (Places::unmoved). An entry leaves as its texture moves or is released, so the list never holds more than the heap's live placements. The device counts them, so use_heap on a device with none loads one atomic and locks nothing. - use_heap (compute and render) is a read of each unmoved texture of the heap, since a kernel or a draw may reach it next through an address: its check goes where the use_heap is. - get_bytes of an unmoved texture moves it in its own upload, ahead of its copy (alias::host_read). replace_region already moved a stale texture (host_write). - Image.over and its source scope in Image::homing are gone: an unmoved image is made homed and never enters an upload's homes. - Runtime README: the heap texture contract says when the move happens. The known gap of textures carries the residuals: a never-written newer texture that is read; an older texture read through a heap declaration after a newer one over its bytes was made and before that one is written (in both, the move may change the older bytes, as AMDVLK's does); a first use rt cannot name; and a draw's first use, checked where the pass's part of the command buffer starts. To verify at this commit (jobs in the handover): the red commit's counts test and heap_alias on lavapipe, clippy in three configurations, doc and private doc, the runtime and validation suites on lavapipe, AMDVLK on a Radeon 780M red at the red commit and green here, and RADV, ANV and NVIDIA unchanged. |
||
|
|
78af808c98 |
rt test: a texture placed over another's bytes moves at its first use, not in an upload (red)
A newer heap texture placed over an older one's bytes takes its move from
UNDEFINED in the upload ahead of its first command buffer. Vulkan lets that
move write the image's memory. If the command buffer reads the older texture
before it writes the newer one, the read can see changed bytes, and Metal
changes none. The pin round's AMDVLK leg showed it: Radeon 780M under AMDVLK,
job m3-max-79662 at
|
||
|
|
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. |
||
|
|
d122da6ae3 |
Tests: the killed-helper test's threads drop their device clones before they answer
a_helper_killed_mid_make_leaves_every_make_its_refusal_at_once makes each
pipeline, and the stage fill, on a detached thread holding a clone of the
device, and that thread sent its answer before its clone was dropped. After
the last answer the test drops its own device and returns, so a detached
thread could hold the last reference and destroy the device while the
process exits. Each thread now drops its clone before it answers, so the
test's own drop is the device's last.
Test-only: no product file changes.
Seen once: the pin round's runtime item on a Radeon RX 7900 XTX (RADV
NAVI31), job m3-max-79526, at
|
||
|
|
71750115c3 |
Tests: a video surface's ready wait counts in the copy form too
a_video_surface_is_waited_for_at_its_ready_point_once asserted that only a surface in place counts a ready wait, the copy form's returning at once. |
||
|
|
f645dde503 |
Tests: the time-breach lives skip a driver whose pipeline cache keeps no creation
a_time_breach_is_asked_once_more_by_a_later_device made the pipeline from a helper's fill on every device that keeps a blob. lavapipe of Mesa 26.0 keeps nothing of a creation in its pipeline cache (keeps_creations' doc), so there a fill's entry makes no pipeline and the make after the fill met CompileRequired. The product answered as documented; the test lacked the guard a_kernel_past_the_stage_bound_is_made_only_from_its_helpers_fill has. The test now asks keeps_creations for each device while the kernel is within the bound, as that test does, and skips a device that keeps none. Test-only: no product file changes. Verified (red): the CI replica's lavapipe step (Ubuntu's Mesa 26.0.8, LLVM 21.1.8), job m3-max-79286, at the cut: "after the fill: a stage of entry weight 264 past the stage bound is not made: its helper's compile met CompileRequired". |
||
|
|
685df4244e |
Validation: the authored compile census re-blessed at semantics 2318
The census table moves with the translator since the last pin: 1903 rows change, every one a
new artifact hash (the product fingerprint moves with SEMANTICS_VERSION 2311-2318). Fifteen rows
change class, all from not_supported to compiled, none the other way: eight that needed the
IdentityDomains form, which the identity-domain reads since
|
||
|
|
6d7127708d |
Tables: golden hashes at semantics 2318, and the MoltenVK profile's opened chains with its stated portability features
The golden hashes table moves from semantics 2310 to 2318 (the bumps of 2311-2318 since the last bless): 2418 rows change, 1136 engine .ll and 1131 engine .air.ll fixtures plus 151 others, every change a hash to a hash. Blessed by bless_golden_hashes on an Apple M3 Max (job m3-max-79327), where the engine inventory and the AIR printouts were blessed unchanged and the metallib half of committed_air_fixtures_parse_and_link ran un-skipped and passed (linkhalf 0). opened_chains.txt: the moltenvk-m3 device and restricted contexts now enable the portability features that profile states (constantAlphaColorBlendFactors and the others 341b80cdef passes on), so their chain hashes move. Blessed by bless_opened_chains (job m3-max-79328, lavapipe node); every_committed_profiles_context_enables_its_pinned_chain passes after it, and failed before it in the pin's lavapipe suite (job m3-max-79276). Tables only; no source change. |
||
|
|
8f708a85b8 |
rt: a portability device's other portability features reach the translator where it states them
The floor asked a device listing VK_KHR_portability_subset for four portability features and enabled only those, so the translator's description withheld the six others it names (constantAlphaColorBlendFactors, vertexAttributeAccessBeyondStride, samplerMipLodBias, shaderSampleRateInterpolationFunctions, separateStencilMaskRef, pointPolygons) on every such device, and the translator took its form without each (a refusal of sample-rate interpolation, of triangles filled as points, a withheld sampler bias) though the device states it. floor.rs: PORTABILITY_STATED holds the six. decide() copies each as the device states it, beside the optional tables, and no device misses the floor for one; device creation enables what decide copies (consumer_features starts from it), and ENABLED carries the table, so named_features and shader_enables pass each enabled one to the translator. A device that does not list the subset reports none and chains no portability structure. README: the table of stated portability features under Portability features; tests::floor holds it to the code. No device above the floor lists the subset: on the M3, KosmicKrisp (Mesa 26.3.1) lists none, and MoltenVK 1.4.2 lists it but lacks nullDescriptor and logicOp (job m3-max-79220, which ran a device leg printing each device's stated and given features). So the change is held by the unit test on the floor's queries. |
||
|
|
e2750b6723 |
rt test: a portability device gives the translator each portability feature it states (red)
The floor's PORTABILITY table enables only the four portability features it requires (imageViewFormatSwizzle, mutableComparisonSamplers, multisampleArrayImage, imageView2DOn3DImage), so on a device that lists VK_KHR_portability_subset, shader_enables passes the translator none of the six other portability features it names (constantAlphaColorBlendFactors, vertexAttributeAccessBeyondStride, samplerMipLodBias, shaderSampleRateInterpolationFunctions, separateStencilMaskRef, pointPolygons). The translator then refuses what they carry (sample-rate interpolation in census 65547 on MoltenVK) though the device states them. A unit test on the floor's queries: a device at the floor listing the subset and stating every portability feature; it asks that each portability feature the translator names reach shader_enables. Expected red until creation enables them where the device states them. |
||
|
|
4609b8c9ac |
Validation: the runtime guard's hash for the emulated tier's partial-threadgroups variant
The emulated simdgroup tier's partial-threadgroups variant ( |
||
|
|
4edb8041ba |
rt test: the bound test ends its open creation while the device's last handle goes on another thread
every_device_replaces_its_pipeline_cache_past_its_bound hung on every card (XTX, RTX 2080, Iris Xe; 600 s, then killed). It holds a creation guard open (cache::creation) so no look comes before the teardown, and it dropped the device's last handle before that guard. Since |
||
|
|
fd80fd886b |
rt tests: the pipeline cache's blob tests ask whether the driver keeps a creation in its cache
Twelve device tests wanted a blob, a grown blob or a stage fill's pipeline wherever the device's
cache data begins with a usable header. The runtime writes the blob only where the cache's size
changed since the last write, and a stage's pipeline is made from the helper's cache data alone;
a driver may keep nothing of a creation in its cache. On Mesa 26.0.8's lavapipe (LLVM 21.1.8,
the CI's) the empty cache's data is its 32-byte header and stays 32 bytes after a render
pipeline or a kernel is made through it, so no blob is written, and a stage fill's data is
answered compile-required, which the runtime keeps as a breach and refuses as a typed
StageSize gap (StageBreach::CompileRequired). The render test failed there at
|
||
|
|
91f3e1ed60 |
Validation: the replay's stand-in checks the hang tripwire before it opens its device
The exported-surface stand-in (replay/new_runtime/standin.rs) opens a Vulkan device of its own with vkCreateDevice, and gpu::tests::device_opens_exist_only_behind_the_tripwire_check failed on it: the open was in no row of the test's table. The stand-in is made at a play's first export, after the play's GPU work began, so a hang its waits wrote to the tripwire could already be set when it opens; the tripwire's contract is that no GPU entry point starts new work while it is set. StandIn::new now calls refuse_if_tripped first, and the table names its open. The test's ordered check (the tripwire check before the open, in the open's own file) held only the runtime's device opens; it now holds every row, each of which already met it. Verified in the CI replica's environment (Ubuntu's Mesa 26.0.8 lavapipe, LLVM 21.1.8, VVL 1.4.341): the test passes (job m3-max-79044), and CI's step 12 in full with no fail-fast passes, 1313 passed and 3 skipped (m3-max-79062). |
||
|
|
fcdcffea07 |
Docs: REFUSALS.md regenerated after the slot-usage refusal met the word-bound draw
The draw now refuses a missing pipeline state at two sites, one from the word-bound content's path ( |
||
|
|
c25a5b238a |
rt: a view made with a swizzle keeps its texture's usage at a slot, as its known gap rules
8811dd6790 checked a texture slot against the usage Metal answers, and answered a view made with a swizzle as ShaderRead and PixelFormatView alone, so a kernel's write through such a view became Refusal::TextureUsageAtSlot. That reversed the runtime's recorded known gap of swizzles (README, Known gaps of textures: a view's descriptor reports its base texture's usage, so a draw into such a view and a kernel's write through it run, the write stored unswizzled; docs/API.md's accepted differences), on which OpenCL mode stands: Apple's OpenCL binds an image of most channel orders as a swizzled view and writes it (tests/opencl_swizzles.rs, job m3-max-16336). The runtime suite on lavapipe at b28f70e076 (job m3-max-78531) failed three tests on it: opencl_mode_queries_of_a_swizzled_write_only_image_answer_the_view, opencl_mode_writes_through_a_swizzled_image_store_the_value_as_written and every_device_reads_through_a_view_s_swizzle_and_writes_past_it, each "the Kernel function uses texture slot 0, whose texture's usage MTLTextureUsageShaderRead | MTLTextureUsagePixelFormatView lacks what its access there asks". The slot check now takes the texture's descriptor usage (TextureObject::metal_usage: Metal's unknown usage as 0x17, a view's its texture's, a swizzled view's included). The known-gap text and new_texture_view_with_swizzle's doc are as before 8811dd6790; the refusal's doc, the README's Texture slots and usage and RESOURCE-ID.md say a view's usage is its texture's, a swizzled one included. The slot_usage test's swizzled destination is now a case that runs and stores the texel as written. The same run failed every_device_gives_an_index_to_the_texture_placed_there_last, whose dispatch wrote through A, a texture of ShaderRead usage alone, at sample_down's written slot: that is the refusal Metal's validation gives, and the test's point is that A's placement empties D's storage element. It now writes through D's ID, the same index, which D's ShaderWrite usage lets the slot check pass, and D still keeps its texels. Verified: cargo fmt; refusal_surface.py --check (REFUSALS.md unchanged). The suite run of this commit follows as a job. The other 865 tests of job m3-max-78531 passed (3 skipped). |
||
|
|
da03093c0c |
rt: TextureUsageAtSlot's basis quotes Metal's (t[0]) as code, which rustdoc read as a link
Rustdoc with -D warnings refused the basis line of Refusal::TextureUsageAtSlot: the quoted Metal
validation text "reads texture (t[0]) whose usage ..." holds t[0], which rustdoc reads as an
intra-doc link to an item named 0 ("unresolved link to `0`", error.rs, three times, in both the
public and the private-items build). The three t[0] are now code spans and the lines reflowed
under 100 columns; REFUSALS.md regenerated (the row's text; basis.rs is unchanged).
Verified: the failure is job m3-max-78486's rustdoc steps (doc and privdoc EXIT=101; fmt, clippy
over the workspace and under --cfg m2v_cpu_icd and --cfg m2v_gpu, refusal_surface --check and
the signatures check passed there). Here: cargo fmt and refusal_surface.py --check; the rustdoc
run of this commit follows as a job.
|
||
|
|
73bb5eb204 |
rt: a dispatch or draw whose texture lacks the usage its slot's access asks is TextureUsageAtSlot
A function's texture slot bound to a texture whose usage lacks what the function's access there
asks reached no element of the texture's and ran: it read element 0 of set 1 (nil's null
descriptor) or a null element as zeros and dropped its writes, with no refusal and no count. The
textures: one no shader reaches (no index: a Depth32Float target of RenderTarget usage alone, a
texture of PixelFormatView usage alone), a colour target of RenderTarget usage alone (null
elements), a texture not made for shader writes at a written slot (no storage element), and a
view made with a swizzle at a written slot (written unswizzled, where plain Metal writes through
the swizzle).
Each dispatch and draw now checks, once after the pipeline state or a binding changes and before
it records anything, each texture its functions' slots reach against the usage Metal's validation
asks by the access the function declares there (pipeline::slot_usage): ShaderRead for a sample or
read slot, a size query alone included; ShaderWrite for a write or read_write slot; both for a
read_write slot it reads. The texture's usage is Metal's answer (TextureObject::metal_usage):
the descriptor's, Metal's unknown usage as 0x17, and a texture reading through a swizzle other
than the identity ShaderRead and PixelFormatView alone. A texture short of it refuses the command,
Refusal::TextureUsageAtSlot { stage, index, usage }, binding and recording nothing. The binds take
every texture, as Metal's do. Gap::SwizzledReadWrite stays checked first for a read_write slot it
reads. The check reads facts the interface and the texture already hold; nothing runs per draw.
Basis (the previous commit's measurement, an Apple M3 Max, macOS 27.0.1, jobs m3-max-78392 and
m3-max-78422): plain Metal reads and writes the texels; Metal's validation asserts "Compute
Function(k_read): reads texture (t[0]) whose usage (0x04) doesn't specify
MTLTextureUsageShaderRead (0x01)", "writes texture (t[0]) whose usage (0x01) doesn't specify
MTLTextureUsageShaderWrite (0x02)" (an access::write argument asked only its width included), and
"Fragment Function(f_first): Shader reads texture (t[0]) whose usage (0x04) doesn't specify
MTLTextureUsageShaderRead (0x01)".
Docs: REFUSALS.md regenerated (the refusal's site); the runtime README's Textures section states
the rule (Texture slots and usage) and its compute encoder, render encoder and swizzle entries
name the refusal; RESOURCE-ID.md's sentence that a slot binding a colour target of neither usage
reads nil now says what a runtime refuses; the doc comments of set_texture, set_vertex_texture,
dispatch_threadgroups, draw_primitives, gpu_resource_id and new_texture_view_with_swizzle name it.
The test literals of the kernel interface and of a content's draws (tests/compute.rs,
tests/indirect.rs) take the new field.
Verified: cargo fmt. The red and green runs, clippy and the runtime suite on lavapipe follow as
jobs.
|
||
|
|
9ad296c6cd |
rt: Refusal::TextureUsageAtSlot, and a test of slots whose texture lacks the usage they ask (red)
A texture slot a function uses, bound to a texture whose usage lacks what the function's access
there asks, reaches no element of the texture's, and nothing refuses it: the slot reads element 0
of set 1 (nil's null descriptor) as zeros and its writes are dropped. A texture no shader reaches
(a Depth32Float target of RenderTarget usage alone, a texture of PixelFormatView usage alone) has
no index; a colour target of RenderTarget usage alone has an index whose elements are null; a
texture not made for shader writes has no storage element. This is the index-free direct bind of
the consumer's row 194 that is still open after
|
||
|
|
1b240ba508 |
rt README: an M3 Max runs a wait met early in another queue's command buffer beside it
The queues' known gap (
|
||
|
|
c9cf5bb1cc |
rt README: a wait met early in another queue's command buffer runs after that whole command buffer (known gap)
L65. Every queue submits to the device's one VkQueue and each segment ends with one global barrier, so a waiter runs after every segment its signaller submitted ahead of it: the rest of the signalling command buffer, not only the signal. Metal's documented order asks only for the signal. Recorded in the queues' known gaps with what was measured. Measured by a WIP probe (not landed; steelbrain/fix-rt-l65 7d5b5cbd21, lavapipe at cef6068642): A runs a short dispatch, signals an Event, then about 100 ms of dispatches; B, committed after it on another queue, waits and runs one short dispatch over buffers of its own; five rounds, then the same with a SharedEvent the host sets after both commits. The stall beyond the event's order: RTX 2080 99.2-100.8 ms (job m3-max-79162), Radeon 780M RADV 99.6-99.7 ms (79142), Iris Xe ANV 28.8-46.0 ms (79143, its A 28-46 ms), lavapipe 110.5-110.9 ms (79126, B on A's buffers); host shape 100.9-101.0, 100.5-101.4, 28.5-29.0, 110.3-111.0 ms. Docs only. |
||
|
|
1536e89b36 |
rt tests: a shuffle kernel's ragged grid runs on its partial-threadgroups variant on every device
wps_uint_k24_s32 over 160 threads in threadgroups of 64 (two whole and one of 32, a whole simdgroup) runs the partial-threadgroups variant: the Emulated tier on lavapipe (compute subgroups below 32) and on the Intel GPUs (the widest-pin rule), a subgroup tier elsewhere. Each thread's 24 words must be the CPU's and every word past the grid keeps its fill; partial_variant_ragged_grids counts the dispatch. |
||
|
|
0d10d346df |
Translator tests: an emulated variant's simdgroup barrier is guaranteed without maximal reconvergence
The partial-threadgroups variant of a4_simdgroup_barrier now compiles in the Emulated tier (runtime-floor), whose predicated walk runs no subgroup operation and keeps no reconvergence mode: Guaranteed with no note, as the plain module. The test expected the subgroup tiers' answer there (job m3-max-78909). |
||
|
|
54d2087b83 |
Translator: the partial-threadgroups variant takes emulated simdgroups at the compile's entry too
compile.rs refused partial_threadgroups beside emulated_simdgroups before lowering, so the emulated variant's partial form never reached the walk a1cbbe66cf plans. Only a flat grid, folded groups and a replay's bindings are refused with it now. Found by an_emulated_partial_threadgroup_ exchanges_among_metal_s_threads on moltenvk-m3 (job m3-max-78894). |
||
|
|
3a5ce18a81 |
Translator tests: the dispatch unit test reads live's flag beside its thread count
KernelDecl::live answers the threadgroup's threads beside the flag since a1cbbe66cf; the test that stores the flag takes the first of the two. |
||
|
|
4b01109b8c |
Translator: SEMANTICS_VERSION 2318 for the emulated tier's partial-threadgroups variant
2317 is held by another change that lands first; the variant's output changes with a1cbbe66cf, so it takes the next. |
||
|
|
15e53e4209 |
Translator: the emulated simdgroup tier takes the partial-threadgroups variant
select.rs refused a kernel's partial-threadgroups variant in the
Emulated tier (Unsupported{PartialThreadgroups}), which the runtime
reports for a ragged grid as Gap::PartialThreadgroups{Translator}. The
tier is lavapipe's for every SIMD-group kernel (its compute subgroups
are below 32), Intel's for a large kernel the widest-pin rule sends
there, and the emulated variant's on every device.
The variant now walks the tier's synchronizations as the subgroup tiers
walk their barriers. workgroup::check plans the predicated walk for a
kernel of partial threadgroups with any of the tier's synchronizations
(an exchange or a threadgroup barrier), with Predication::partial_groups
set, so emit_entry starts `live` from Metal's threads (lin < n) and the
invocations past them reach each exchange's barriers never live, storing
nothing. The exchanges take Metal's thread count as the threadgroup's
N: KernelDecl::live also answers that count, emit_entry keeps it as
EmitCx::entry_threads, and Emu::n is it in place of the local-size
constant. Every existing rule below N then answers Metal's partial
threadgroup: a read of a lane past it reads the calling lane, folds,
votes, ballots and quad masks take only the lanes below it. The scratch
stays sized from the local size, so every invocation has its slot.
Docs: LoweringInputs::partial_threadgroups, the divergent and workgroup
module docs, PartialThreadgroupsSite::Translator, the runtime README's
partial-threadgroups gap, and docs/REFUSALS.md regenerated.
SEMANTICS_VERSION 2316 -> 2317.
|
||
|
|
7951effa91 |
Tests: the emulated simdgroup tier's partial-threadgroups variant
The interpreter runs neighbour (a threadgroup barrier and a simd_sum)
over a ragged grid of 100 threads in threadgroups of 48, its region
flagged NONUNIFORM, in the Emulated tier: lavapipe's and gate-lavapipe's
own (compute subgroups of 8 and 4) and moltenvk-m3's emulated variant.
Each thread must read its neighbour modulo its threadgroup's threads and
sum its simdgroup's lanes among them, and the invocations past the grid
store nothing. The widest-pin rule's four large shuffle kernels must
take the partial-threadgroups variant in the Emulated tier on the four
Intel profiles.
partial_threadgroups_are_refused_with_another_form drops its emulated
form, which the variant now takes.
Red at this commit: select.rs refuses the variant in the Emulated tier
(Unsupported{PartialThreadgroups}).
|
||
|
|
6a14aa4192 |
rt: the parameter ring frees its idle blocks past the first
What: the ring's idle rule (Ring::due), run on the block-maker thread beside the pool's: a block past the first goes once every chunk of it has been free for the idle age (250 ms), where the ring, at its fewest free chunks since the block fell idle, kept more than a block's chunks free without it, so neither a take in that time nor the next would have asked for a block. The fewest is set at the give-back that made the block idle, from the chunks the ring has free once that give-back is done, and falls with each take. The first block stays, and so does a block holding the nil buffer, the zero range or the whole range. A take now takes a chunk of the oldest block with one free, so the newest blocks fall idle first; each block keeps its own free chunks. A block past the first that falls idle wakes the block-maker thread (Pool::nudge); the thread frees it as memory of its own (Loose::RingBlock: its fault span noted freed, the buffer destroyed, the memory freed, the blocks gauge falling). A block that does not meet the rule now cannot meet it in the same idle time, so the thread sets no wake for it. Why: the planner's cache ruling (1). The ring kept every block it made for the device's life, so a burst of parameter writes left its peak of 2 MiB blocks of the ring type (device-local and host-visible, small without resizable BAR) until the device went. Freed at idle alone, a ring in steady use would free its second block and make it again each idle age. A second condition, no take for the idle age, which took an idle ring down to its first block, was dropped by the planner's ruling: whether a take waited for a block it then made again could not be read on a recorded play, so an idle ring keeps its first block and the one ahead of it. Docs: the ring module doc, Ring::due, Pool::nudge, memory::run, the runtime README's internals paragraph. Verified: red on the RX 7900 XTX (RADV 26.2.6) with the parent's runtime and this branch's tests, m3-max-79046: the burst test timed out waiting for the ring back to its first block and the one ahead; the steady-use test passed (nothing is freed). Green in the same job at this code: the ring, ahead and memory modules, 33 passed, "6 blocks after the burst, 2 once idle; the next take made none". At this tree (f882510ace, the same tree): clippy -D warnings plain, under m2v_cpu_icd and under m2v_gpu, rustdoc -D warnings, and the workspace's rustdoc of private items, all exit 0; the runtime's suite on lavapipe 904 passed, 3 skipped, with the same line (m3-max-79050). The cost line, one job on the Radeon 780M (RADV PHOENIX, Mesa 26.2.6), the release replay player on stream glbench-780m-r2 with a fresh pipeline cache each play, arms a (the parent's runtime) and b (this one) alternated a b a b (m3-max-79045): 792 frames each; blocks made a 300 and 299, b 300 and 299, 37.88 and 37.75 per 100 frames in each arm, with block bytes made equal pair by pair (the one-block difference between the pairs is a pool allocation, 33.5 MB, in both arms). This play makes no ring block more than the parent. |
||
|
|
37386714e3 |
rt test: the ring frees a burst's blocks past the first once idle, and none in steady use (red)
The parameter ring keeps every block it makes for the device's life, so a burst of parameter writes (a guest's set_bytes, long parameter blocks) leaves its peak of 2 MiB blocks of the ring type, device-local and host-visible memory, which is small on a device without resizable BAR, until the device goes. The tests: with the nil buffer kept in the first block, a burst of four blocks' chunks makes blocks past them; given back, the ring goes back at the idle age to its first block and the one ahead of it, and no block more goes another idle age later; the blocks gauge falls with the blocks freed, and the next take makes no block. And a ring settled at two blocks that serves frames of three chunks, taken and given back every few milliseconds for six idle ages, makes and frees no block. Expected red today: the burst's blocks stay; the steady test passes (nothing is freed). |
||
|
|
94ff4c989a |
rt: a time breach counts the device lives that met it
Main's ruling on the stage cache's time breach. The first breach refuses in
its own device life alone, and a later device asks the helper once more. A
second breach, in another life, refuses in every life until the driver's
version changes. A fill after the first clears the count. Old records are
dropped.
- Core.stage_life: an id for each device life (stage::life(): the process
id and the host time, hashed under fresh RandomState keys).
- Entry::Timed(Timed { lives, life }): a time breach's record after its
byte is TIME_FORMAT (2), the count of lives (1 or 2) and the last life's
id (8 bytes).
- record_stage_breach(Time) keeps stage::timed(dir, key, life). The count
is 1 where the directory holds no time breach of the key (none kept, or a
fill took its place), and 2 where it holds one of another life. A breach
kept again in the same life changes nothing.
- read_entry takes the reader's life:
- a time breach of 2 lives, or of the reader's own life, refuses
(StageGap::Breach(Time));
- one of 1 other life is a miss that keeps its file: Error::StageUnfilled
again, the consumer asks its helper once more, and the record stays for
a second breach to count;
- any other time record is a miss and removed: the old one (the byte
alone), another format version, a count of 0 or 3, a life cut short.
The format version is the time record's own byte after the breach's byte,
not a change to the stage key. So the other breaches and the cache-data
entries keep their format and stay: no helper compiles again for them.
Docs:
- the stage module docs; StageBreach::Time; record_stage_breach;
StageGap::Breach;
- the runtime README, under Kernels past the stage bound: a bullet for the
count, and the sentence on a breach refusing with no helper asked
qualified for a time breach of one life;
- the README's known gap on heavy kernels: refused for the cap, or for the
time in two device lives. One sentence: a kernel whose helper passed the
time in one life is asked once more by the next device, which waits up to
that time again;
- REFUSALS.md regenerated (unchanged); api signatures --check 0.
Tests, in tests/stage.rs, device-free: the ruling's four.
- a_time_breach_refuses_in_its_own_life_alone_and_a_later_device_asks_again
(also: the record is 68 bytes; two lives' ids differ);
- a_second_time_breach_in_another_life_refuses_in_every_life (a breach kept
again in the first life counts no second life, and a third counts no
third);
- a_fill_after_a_first_time_breach_clears_its_count;
- a_time_breach_of_an_old_format_is_dropped.
The existing unit tests read in a fixed life, and the time breach leaves
their list of breaches that hold their byte alone.
Verified (green): Radeon 780M (RADV PHOENIX, Mesa 26.2.6), m3-max-79073, at
this commit. tests::stage: 15 tests run, 15 passed, 897 skipped, the device
tests included.
m3-max-79094, at this commit: workspace clippy (all targets, all features,
-D warnings) EXIT=0 in all three configurations (plain, --cfg m2v_cpu_icd,
--cfg m2v_gpu); Rustdoc EXIT=0; the runtime's private Rustdoc EXIT=0. The
runtime suite on lavapipe: 907 tests run, 907 passed, 3 skipped.
|
||
|
|
ccb067d2af |
Tests: a time breach is asked once more by a later device
The stage cache's time breach (StageBreach::Time) refused its pipeline on
every later device life until the driver's version changed. So one helper
compile past the consumer's time limit, on a loaded host for example,
refused a heavy kernel for good. Main's ruling: the record counts the device
lives that met the breach. The first refuses in its own life alone, and a
later device asks the helper once more. A second, in another life, refuses
in every life, as before. A fill after the first clears the count. The
record's format version is bumped, so old records are dropped, not trusted.
tests/stage.rs, on a device, through the public API alone:
- a_time_breach_is_asked_once_more_by_a_later_device: six device lives on
one cache directory.
- The first keeps a time breach and is refused.
- The second asks for the same fill. A helper's fill there takes the
breach's place, and the pipeline is made.
- The third makes the pipeline from that fill.
- The fourth keeps a time breach before its make (a first again) and is
refused.
- The fifth asks past it, keeps its own breach (the second life's), and is
refused.
- The sixth is refused, with no fill asked.
- a_helper_killed_mid_make_leaves_every_make_its_refusal_at_once: after the
time breach, the later device now asks for the same fill once. Its own
breach then refuses there and on the device after it. The memory breach
is unchanged.
Verified (red): Radeon 780M (RADV PHOENIX, Mesa 26.2.6), m3-max-79073, at
this commit. Both tests fail where the later device is refused:
"Some(Unsupported(StageSize { weight: 204, cause: Breach(Time) }))"
(stage.rs:577 "the second life"; stage.rs:782 "a later device, one time
breach"). tests::stage: 11 tests run, 9 passed, 2 failed, 897 skipped.
|
||
|
|
7a1da6cb22 |
rt: a draw through buffers bound at a multiple of 4 below their alignment draws the state's word-bound content
Row L97 (the draw residual). A dispatch of a function's kernel whose buffer
argument of 8 or 16 is bound at a multiple of 4 below that alignment runs a
variant of its kernel that holds the slot to 4 (8 where a 64-bit atomic may
reach it). A draw refused such a bind (Refusal::BufferOffsetAlignment). It
now draws the same way.
- RenderPipelineState::for_words(device, words) makes the state's content
with LoweringInputs::word_bound_buffers set for its vertex function (bits
0..31) and fragment function (bits 32..63). The device's map of contents
keeps it under the state's key with that mask (KernelKey.words widens to
u64). Like a pass's 2D-array content, it has no cache record of its own.
Its samplers are numbered at the state's indices; a mismatch is
Gap::KernelInput (ConstexprSampler).
- RenderCommandEncoder keeps the state set (`base`) apart from the state it
draws through (`pipeline`). Where a draw's facts are not held (a bind or
the state changed), bind_words reads the base's buffer address fields. A
slot of mask 7 or 15 whose bound address is a multiple of 4 but not of
its alignment sets its bit. The mask is ANDed with the slots the state
lowers from AIR (word_slots: a function the consumer compiled has none,
and its bind stays refused). A new mask switches `pipeline` to that
content, or back to `base`. An execution of an indirect command buffer
draws through `base`.
- The draw's own checks then hold each slot to the content's alignment: an
address off a multiple of 4 is still refused, as is one off 8 that a
64-bit atomic may reach.
Cost: a draw bound aligned keeps the state it was set with, and the scan of
its address fields runs only where the draw's facts are found again
(expected from the code, not measured). The first draw of a new mask lowers
both functions again and makes the content's VkPipeline (a first-use wait),
as the compute variant does. A later draw of that mask finds the content.
Docs: the runtime README (Render encoders: the draw bullet; Compute
encoders: the variant's paragraph); error.rs's BufferOffsetAlignment;
docs/API.md section 1 and its accepted differences. REFUSALS.md unchanged
(refusal_surface --check 0); api signatures --check 0.
Verified:
- Green on lavapipe, m3-max-79015 (at this commit's tree before its rebase
onto
|
||
|
|
d8c04db088 |
Tests: a draw through buffers bound at a multiple of 4 below their alignment
Row L97 (the draw residual): a draw whose vertex or fragment function takes
a buffer argument of 8- or 16-byte alignment bound at a multiple of 4 below
it is refused (Refusal::BufferOffsetAlignment). A dispatch of a function's
kernel bound so runs a variant of its kernel that holds the slot to 4
(LoweringInputs::word_bound_buffers). Plain Metal draws it, each element at
its own address; Metal's API validation stops the bind offset.
tests/draw.rs, new:
every_device_draws_through_buffers_bound_at_a_multiple_of_4_below_their_alignment.
It binds colored_vertex's float2 positions at 20 and float4 colours at 24,
and branching_fragment's float4 weights (examples/icb_linked_arguments.ll)
at 4, apart and together. Each draw must give the texels the same values
give bound aligned. The first draw of each new bind lowers a content (the
translations counter rises); a second draw of the same bind finds it.
Positions bound at 18 are still refused (index 0, offset 18, alignment 8).
every_device_refuses_a_draw_whose_buffer_is_off_its_alignment now binds off
a multiple of 4 (18), which stays refused.
Verified (red): lavapipe, m3-max-79015, at this commit alone (tree equal to
this one before its rebase onto
|
||
|
|
0bf6fa1e3e |
rt README: a target's linear image in place is made again without the loop usages for any place condition it fails
Audit finding F3 (wording). The runtime README said a colour render target's linear image over a buffer is made again without the sampled and feedback usages where the image with them "does not lie at bytes_per_row". The retry (texture.rs, after make's Unmade::Unfit) runs for every cause Unfit names: - Pitch: its rows not at bytes_per_row; - RenderReach: its subresource past the texture's rows or the buffer; - Alignment: its memory alignment not met; - ImageMemory: its memory type not taken. The sentence now names those conditions. It also says what follows the retry: the texture lies in place where the image without the usages meets them, and is copied where it does not. Docs only; nothing built. |
||
|
|
0a7a446fa1 |
Harness: its gauges name what they hold, with level elements, timestamp pools and buffer set pools
named()'s doc said it held every count of an object kind the runtime keeps live; it held 15 of them. It now says what it holds: the kinds a compute workload makes or reaches, and the render contents and attachment views, which none makes; the kinds only draws, passes, surfaces, imports, exports and indirect command buffers make are a replay's gauge records. It adds the three of those kinds a compute workload reaches: level_elements (a texture's levels' storage elements), timestamp_pools (the command buffers' GPU time queries) and buffer_set_pools (a dispatch's bound buffers' descriptor sets). Each is recorded at the 100th and 200th runs and at device drop, as the others are. Verified: in the hand-over. |
||
|
|
8dd00ec58c |
rt: a quiesce begins no last blob write past its deadline
What: Caches::last_write, the reaper's last write at a quiesce, checks the quiesce's deadline before each try for the creations lock and again before it reads the cache's data to write: past the deadline it writes nothing and counts the skip in Metrics::pipeline_cache_writes_skipped. A write begun before the deadline still runs to its end. Past the deadline before the lock, the size is not read, so the skip is counted whether or not the cache changed; the doc says so. At the device's teardown, with no deadline, nothing changes. Why: the audit lane's finding. The deadline was checked only while a creation held the lock, and halt() asks the reaper to stop after the submit, block-maker and completion stages, which may use the whole timeout; so with no creation running a write of up to 128 MiB could begin past the deadline, quiesce answering false while it ran on, against the quiesce doc. Docs: Device::quiesce, Metrics::pipeline_cache_writes_skipped, Caches::last_write, the runtime README's Quiesce and exit. Verified: red on the RTX 5080 Laptop (NVIDIA 615.71.09) with the runtime sources of the test's commit, m3-max-78990: the new test timed out waiting for the skip (61.7 s; the last write took the lock and wrote). Green in the same job at this code: the five blob tests passed, 902 skipped; "quiesce late: the last write past a passed deadline skipped, the drop wrote the blob"; the doubling test 5 writes of 286050 bytes for a 108159-byte blob. At this tree (dd0a40d8c6, the same tree): clippy -D warnings plain, under m2v_cpu_icd and under m2v_gpu, and rustdoc -D warnings, all exit 0; the runtime's suite on lavapipe 902 passed, 3 skipped (m3-max-78987). lavapipe keeps no blob, so the blob tests pass there without one. |
||
|
|
5b1acd0aa9 |
rt test: a quiesce begins no last blob write past its deadline with no creation running (red)
Caches::last_write checks a quiesce's deadline only while a creation holds the creations lock. halt() asks the reaper to stop after the submit, block-maker and completion stages, which may use the whole timeout, so with no creation running a blob write of up to 128 MiB could begin past the deadline: quiesce answers false, and the write runs on after it, which the quiesce doc says does not happen. The test: a cache grown with its look skipped under a creation held open; the reaper held at a job of the test's; the creation ended; a quiesce of no time, which answers false; then the reaper, let go, comes to its end with the deadline passed and no creation running. It writes nothing and counts one skip in Metrics::pipeline_cache_writes_skipped, and the drop then writes the grown cache. Expected red today: the last write takes the lock at once and writes the blob; no skip counted. |
||
|
|
78ae218f00 |
rt docs: the sample-positions links name their items plainly
The private-items rustdoc (CI's "Private intra-doc links" step, merge check m3-max-78917 at |
||
|
|
212d7b2d8e |
rt: blit copies whose rows meet go a row at a time where no one axis orders them, and a surface's plane lies in its buffer
Row L212. Metal leaves overlapping copies undefined; an Apple M3 Max reads the source whole before it writes, which the runtime gives as slabs, and no Vulkan copy command may read bytes it writes (VUID-vkCmdCopyImage-pRegions-00124, VUID-vkCmdCopyBufferToImage-pRegions-00173, VUID-vkCmdCopyImageToBuffer-pRegions-00184). Form (blit.rs): - Slabs becomes an enum: Across (the existing single-axis cut) and Rows (RowSlabs). Where cut() finds no axis, row_by_row() takes the rows one at a time. Each row goes before every row whose source its destination lies on: descending where every destination row lies on a source row after its own (meeting()'s y shifts all positive), ascending where all are negative. - Within a row, the shift from the destination row to its own source row (the first row's, plus the pitch difference per row) decides the cut. Zero: the row is its own bytes and copies nothing. Less than the row: slabs of |shift| in whole texels, the far end first. Otherwise: one command. - Slabs::of yields each slab's 3D start, which ImageCopy::regions and BufferCopy::slabs add to the other side's origin and to the buffer offset. - An execution barrier still separates two commands. Every hazard between them is a write after a read, as no row reads bytes an earlier row wrote. - Still refused (Gap::OverlappingCopy): rows of two pitches that cross, where one destination row lies on a source row before its own and another on one after its own. Surface (texture.rs, buffer.rs, surface.rs, d3d11.rs): - An exported surface's plane image keeps its PlaneLayout (Under::Surface laid, from SurfaceImage). - TextureObject::rows_in(buffer) answers the plane's rows in a buffer on the surface's memory: BufferObject::surface_range matches the buffer's block aliases to the plane's (Arc::ptr_eq) and maps the plane's offset through the block's memory range. - A copy between a buffer and a texture takes those rows where the texture has none of its own. A texture over the surface's buffer is always the copied form (OverCause::Surface), so a copy between it and a plane shares no bytes in Vulkan, and is left as it was. - The surface's buffer and planes are aliases that read alike in the general layout. Surface::buffer's doc quotes the section. Docs: - blit.rs and the copy methods' docs; error.rs's OverlappingCopy (REFUSALS.md regenerated). - The runtime README: Blit encoders, their known gaps (only crossing pitches remain refused), and the surface's buffer. Verified: - Green, on lavapipe, m3-max-78902 (at 70c887a155, before the rebase): the blit module, 26 of 26 passed (865 skipped). The plane is in place (OpaqueFd); into it and out of it go a row at a time. - Cards, the blit module at 02421a08a9, 26 of 26 passed (867 skipped) on each. That tree differs from this one only by a branch for a texture in place over a surface's buffer, now deleted: no device laid one in place, and each printed "copied". - Radeon 780M (RADV, Mesa 26.2.6), m3-max-78888. - Iris Xe (ANV, Mesa 26.2.6), m3-max-78889. - RTX 3090 (NVIDIA 620.70.06), m3-max-78896. On each, the textures over one buffer are in place: whole rows go a row at a time (16 slabs; 256 on the Iris, whose memory alignment is 4), and two pitches go a row at a time. The surface's plane is in place (OpaqueFd), into it and out of it a row at a time. - m3-max-78906 at 70c887a155: workspace clippy (all targets, all features, -D warnings) EXIT=0 in all three configurations (plain, --cfg m2v_cpu_icd, --cfg m2v_gpu). Rustdoc and the runtime's private Rustdoc EXIT=0. The runtime suite on lavapipe: 888 tests run, 888 passed, 3 skipped. - refusal_surface.py --check: 0 at this commit. |
||
|
|
fb53900e04 |
Tests: blit copies whose rows meet in no order one axis keeps, and a surface's buffer and its plane
Row L212: copies between rows in place over one buffer (two textures over it, or a region of it and a texture over it) whose rows meet in no order a cut along one axis keeps were refused (Gap::OverlappingCopy): a destination row across the end of its own source row and the start of the next, and rows of two pitches that meet at their starts. Copies between an exported surface's buffer and its own plane in place were not checked at all: the plane carried no rows, so the copy was one command whose source and destination share bytes. Unit tests (blit.rs): - regions_of_two_textures_over_one_buffer_copy_in_slabs_where_their_bytes_meet expects whole rows two texels on to copy a row at a time, the last row first on and the first row first back, each row in slabs of two texels, the far end of its shift first. Rows of two pitches that meet at their starts copy a row at a time, after the row whose source each writes, and the first rows (the same bytes) copy nothing. - a_buffer_copy_over_its_texture_s_own_bytes_copies_in_slabs_or_in_no_order expects the same of a region and a texture over its bytes, into the texture and out of it, with each command's buffer offset. Device tests: - Textures over one buffer: whole rows a memory alignment on and back. Where the device lays a texture twice as wide at twice the pitch in place, the two pitches both ways. - A buffer and a texture over it: whole rows on, and a region at twice the texture's pitch, into it and out of it. - New: a copy between an exported surface's buffer (Surface::buffer) and its own plane, a row on, into the plane and out of it. Each checks every byte against a memmove of the source from before the copy, one submission, and the barriers of one command a row (blit barriers for the surface, whose hand-overs add barriers of their own). None is refused. Verified (red): on lavapipe, m3-max-78902 at this commit alone: 26 tests run, 21 passed, 5 failed, the five tests above. The unit tests and the two device tests of rows in place are refused (Gap::OverlappingCopy). The surface test records one command where three rows were due: blit barriers (1, 2, 0, 0) against (1, 4, 0, 0). |
||
|
|
9c375eb504 |
Conformance ledger: the sample-positions cases answer on the runtime, so their seventeen refused rows go
The rt side of the suite now hands a pass's positions to the runtime's RenderPassDescriptor
instead of answering `setSamplePositions:count:` Unavailable, so the answer those rows expect,
`Err(Unavailable({call: "setSamplePositions:count:"}))`, can no longer occur on any venue. The
fourteen `*` rows (custom-left, custom-mixed, custom-right, the three fewer-, high, off-grid,
off-grid-low and the five rounded- cases) and the three venue rows of sample-positions-custom-2x
(Iris(R) Xe, RADV, NVIDIA) are dropped. A venue without VK_EXT_sample_locations, or whose
properties fall short of the answer, would answer at the same site with
`Refusal::SamplePositions` of `Unsupported` or `Gap::RenderPass`, which its replay would print as
unlisted; no venue run here does. docs/CONFORMANCE-COVERAGE.md is regenerated (7979 ledger rows to
7962); docs/METAL-COVERAGE.md is unchanged.
Verified: `conformance replay` of the 19 sample-positions cases and pass-sample-positions at
33865b2a57, before this edit, on each venue: every one of them listed exactly these rows as no
longer held ("now matches: 15", 14 on the Apple M3 Max, which has no custom-2x row) and nothing
unlisted; the custom and rounded cases read announced (justified by notices) on each.
- RX 7900 XTX, RADV NAVI31, Mesa 26.2.6: m3-max-78702
- Radeon 780M, RADV PHOENIX, Mesa 26.2.6: m3-max-78710
- RX 550, RADV POLARIS12, Mesa 26.2.6: m3-max-78713
- RTX 2080, NVIDIA 620.70.06: m3-max-78703
- RTX 3090, NVIDIA 620.70.06: m3-max-78711
- Iris Xe (RPL-P), Mesa 26.2.6: m3-max-78704
- Apple M3 Max, KosmicKrisp Mesa 26.3.1 (VK_EXT_sample_locations revision 1): m3-max-78722
lavapipe's replay with this ledger runs in the green job. Not run: the RTX 5080 Laptop GPU and the
Windows host's UHD Graphics 630.
|
||
|
|
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. |
||
|
|
c2860b1fa0 |
Runtime test: a pass rasterizes at the sample positions its descriptor sets
The red test of L168 (custom sample positions dropped while the guest is told they are supported): RenderPassDescriptor gains sample_positions (`setSamplePositions:count:`), held and not applied, and SamplePosition (`MTLSamplePosition`). The device test every_device_rasterizes_a_pass_at_its_sample_positions draws a white triangle left of a vertical edge through column 4 of an 8 x 8, 4-sample RGBA8Unorm target, resolves it, and checks the samples of that column the positions cover, as the conformance suite's sample_positions rows measured Metal on an Apple M4: the defaults 2 of 4 at the column's middle, four at x 0.25 all, at 0.75 none, one at 0.25 and three at 0.75 one, a tie at 0.53125 taken up to 9/16, 0.97 taken to 15/16, and two positions in the pass of four putting samples 2 and 3 at the pixel's corner. It runs on each device that lists VK_EXT_sample_locations with 4 samples and variable locations, and prints the extension's properties. Red here: the positions are dropped, so every custom case covers what the defaults cover. |
||
|
|
d4b181c2a8 |
Translator: the graphics state says whether the fragment module interpolates at a sample
GraphicsState::interpolates_at_sample is true where the fragment stage's module statically uses GLSL.std.450's InterpolateAtSample (interpolate_at_sample, or a sample-qualified varying read in the loop over the covered samples), read from the module's instructions at link: an OpExtInst of instruction 77 through the GLSL.std.450 import. Vulkan forbids that instruction in a pipeline whose sampleLocationsEnable is true (VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524), so a runtime that draws Metal's programmable sample positions through VK_EXT_sample_locations reads it before it makes such a pipeline. The field is encoded with the graphics state, so ARTIFACT_FORMAT_VERSION moves to 600, and it is a new reflection fact of every render pipeline, so SEMANTICS_VERSION moves to 2317 (development's is 2316). No module's words change. Test: engine_pull_model's the_graphics_state_states_whether_the_fragment_module_interpolates_at_a_sample (pm_sample and pm_sample_id true, pm_center, pm_centroid and pm_offset false, at four samples on every committed profile that compiles them). Verification: the lane's msi job (below the fix). |
||
|
|
dcd502c921 |
Tests: the attachment-view tests' render targets take a texture index
A colour render target takes an index of set 1's texture arrays (Refusal::TextureIndex), so both tests stopped at their target's make on lavapipe (job m3-max-78835) before reaching a pass. Each now grants index 4096 and makes its target there, as the pass tests do. |