Skip to content

[SYCL] Fix DirectX 11 interop test failures#21430

Open
lbushi25 wants to merge 16 commits intointel:syclfrom
lbushi25:dx11_interop_test_fail
Open

[SYCL] Fix DirectX 11 interop test failures#21430
lbushi25 wants to merge 16 commits intointel:syclfrom
lbushi25:dx11_interop_test_fail

Conversation

@lbushi25
Copy link
Contributor

@lbushi25 lbushi25 commented Mar 3, 2026

The test read_write_unsampled.cpp implicitly relies on the assumption that a 2D texture in DirectX 11 has the row major layout in memory. This is because the test, in the absence of a DirectX 11 API to query texture allocation information, attempts to calculate the allocation size of the texture the best it can manually by simply multiplying all the dimensions of the texture. This is then passed to the SYCL external memory import functions to make a SYCL image out of the texture.

This assumption, which was not at all mandated by the spec, seems to have fallen apart recently as the layout for a default usage texture in DirectX 11 has been changed to no longer be row major in certain conditions and I suspect this broke many test cases embedded in the test.

This PR attempts to fix this by utilizing the newer DirectX 11.3 API which allows us to explicitly request the textures to be laid out in row major order in memory.

@lbushi25 lbushi25 marked this pull request as ready for review March 5, 2026 04:35
@lbushi25 lbushi25 requested a review from a team as a code owner March 5, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants