[SYCL][E2E] Cover compressed textures in bindless image interop tests (#23366)
The D3D12 interop tests create all textures with
`ALLOW_SIMULTANEOUS_ACCESS`, which disables compression. The Vulkan
tests use only tiny images. So the tests miss compressed textures, which
are the common case in applications. On DG2, the Windows driver accesses
imported compressed D3D12 and Vulkan textures as if they were
uncompressed. As a result, `fetch_image`, `sample_image` and
`write_image` read and write the wrong data. This is also the driver bug
that makes `vulkan_interop/depth_format.cpp` fail on DG2 (#21985).
Changes:
- Create the D3D12 test textures without `ALLOW_SIMULTANEOUS_ACCESS`.
Such textures don't decay to `COMMON` after a copy, so the uploads now
transition them back explicitly.
- Add `D3D12_sycl_interop_2D_read_write.cpp` and
`vulkan_sycl_image_interop_read_write_2d.cpp`. Each test:
- fills a texture by a copy or a render target clear, at 32x33
(uncompressed), 1366x768, 1920x1080 and 3840x2160;
- reads and writes it in place with a SYCL kernel;
- checks both the values read and the raw texels written, through the
producer API.
They also cover the `unorm_int16`, `snorm_int8` and `snorm_int16`
formats, with and without semaphores. The shared code is in
`helpers/interop_read_write.hpp`.
- Run the semaphore cases of the D3D12 1D read/write, 2D/3D read and 2D
arithmetic tests on DG2 and BMG, and of the Vulkan 1D/2D read and 2D
arithmetic tests on Windows. They were disabled until the CI has driver
38303, which it has now.
- XFAIL the D3D12 2D/3D read, 2D arithmetic and new tests on Windows DG2
because of the driver bug (#21985).
- Second commit: re-enable the D3D12 2D/3D write and buffer timeline
semaphore tests on Windows. They hung on BMG with driver 101.8860
(#22576), but pass with 101.9030. This is a separate commit so that it's
easy to drop.
- The Vulkan read/write test transfers image ownership to and from
`VK_QUEUE_FAMILY_EXTERNAL`, and the D3D12 one also imports with
`win32_nt_dx12_resource`. The DG2 bug reproduces with both.
Testing: the changed and new tests (582 RUN lines) were built with
`-Werror` and run outside lit:
| | BMG (B580), 101.9030 | DG2 (A770), 101.9030 | DG2, test driver with
the fix |
|---|---|---|---|
| New D3D12 read/write | 23/23 pass | 21/23 fail (the 32x33 cases pass)
| 23/23 pass |
| New Vulkan read/write | 17/17 pass | 15/17 fail (the 32x33 cases pass)
| 17/17 pass |
| D3D12 2D read / 2D arithmetic / 3D read | pass | 61/61, 59/60, 50/61
fail | pass |
| Other changed tests, incl. re-enabled semaphore cases | pass | pass |
pass |
| D3D12 2D/3D write, buffer timeline semaphore, 5 repetitions | pass |
pass | pass |
The driver fix is in review internally.
Assisted-by: GitHub Copilot (Claude Opus 5.5)