Files
reims-vgpu/conformance/baselines
Anees IqbalandClaude Opus 5 596e37c7e3 conformance: an overlapping self-copy is not undefined, and this device drops it
Component: conformance/, test-only. Native oracle: Apple M4, macOS 15.6.1.
Guest: macos-13 rail, x86 macOS / Linux Vulkan pathway.

A driven Maps interaction on this rail issues `copyFromTexture:toTexture:`
naming one texture twice at different origins, several times a boot -- a
horizontal shift inside one row and a one-texel column shifted a dozen rows
down. This device refuses those as `t2t_overlap` and returns an error to a blit
encoder that, on real hardware, does not fail. The copy is dropped and the guest
treats it as complete.

The refusal's own comment called the shape "undefined in Metal", which is the
term this case exists to settle. It is not undefined on the oracle. Measured
there in three identical runs, over both live shapes and on both a buffer-backed
and an ordinary image, `copyFromTexture:toTexture:` with intersecting rectangles
produces source-snapshot semantics: the whole source region is read before any
destination byte is written. Row-at-a-time execution gives a different answer for
both shapes, and a disjoint copy -- where the two readings agree -- separates a
device that mishandles the overlap from one that refuses every self-copy.

Three cases, all `PASS` on the oracle and recorded in the tracked native
baseline:

- `self_copy_overlap_row_shift_14` -- 20 texels of one row copied 14 texels
  right, so the destination overwrites source texels the same row still reads.
- `self_copy_overlap_column_shift_12` -- a one-texel column, 17 rows tall,
  shifted 12 rows down, so a top-down loop overwrites rows 12 through 16 before
  reading them.
- `self_copy_disjoint_control` -- the same call shape, rectangles disjoint.

Raw guest result on the identified control (HEAD, no product change), reproduced
identically in two complete batteries: the control case **passes**, and both
overlap cases **fail** with `still_pre_copy` equal to the full copy extent --
20/20 texels and 17/17 texels still holding exactly what they held before the
copy. That is the signature of a dropped copy rather than a mis-ordered one, and
it is the refusal doing it.

Owner: `exec_copy_texture_to_texture` in `runtime/blit_exec`, which decides the
overlap. Not shader translation and not the guest driver, so neither rail
inventory takes these; they are this device's own defect and the next commit
repairs them.

Counts: 185 PASS / 79 FAIL / 29 SKIP on the guest, against the parent's
184/77/29 -- the disjoint control is a new pass and the two overlap cases are the
two new failures. Every other case is identical to the parent's envelope in both
runs. Native: 293 cases, 0 failures, 0 skipped.

An earlier draft of these cases declared the image over an `MTLBuffer`, and all
three failed on the guest with the readback dispatch refused
(`compute_buffer_texture_unsupported`) rather than on the copy. That would have
made the case a witness for a different gap, so the image is an ordinary one and
the control's pass is what proves the distinction holds. The buffer-backed
readback gap is real, unrelated, and not covered here.

Not verified: one rail and one pathway. The oracle result is Apple silicon only;
no Intel Mac was measured, and nothing here claims the semantics are architecture
independent. No product behavior changes in this commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-30 04:08:13 +03:00
..