Skip to content

[Offload] Add support for Mipmapped Textures#708

Merged
s-perron merged 6 commits intollvm:mainfrom
s-perron:miplevels
Feb 19, 2026
Merged

[Offload] Add support for Mipmapped Textures#708
s-perron merged 6 commits intollvm:mainfrom
s-perron:miplevels

Conversation

@s-perron
Copy link
Contributor

@s-perron s-perron commented Feb 3, 2026

This commit extends the offload-test-suite infrastructure to support
textures with multiple mip levels.

  • Update OutputProperties to include MipLevels.
  • Update Vulkan backend to correctly create, upload, and sample from
    multi-mip images.
  • Add error checking in the DirectX and Vulkan backends to validate
    texture dimensions and mip counts.
  • Add docs/MipMappedTextures.md to explain the required data layout.

Comprehensive tests were added for Texture2D functions, including sampling,
gradients, and LOD calculation. Existing tests were updated to reflect
correct results under the new infrastructure.

Note: Multiple mip levels are currently restricted in the DirectX backend
via runtime error checking.

Fixes #690

Assisted-by: Gemini

This commit extends the offload-test-suite infrastructure to support
textures with multiple mip levels.

- Update OutputProperties to include MipLevels.
- Update Vulkan backend to correctly create, upload, and sample from
  multi-mip images.
- Add error checking in the DirectX and Vulkan backends to validate
  texture dimensions and mip counts.
- Add docs/MipMappedTextures.md to explain the required data layout.

Comprehensive tests were added for Texture2D functions, including sampling,
gradients, and LOD calculation. Existing tests were updated to reflect
correct results under the new infrastructure.

Note: Multiple mip levels are currently restricted in the DirectX backend
via runtime error checking.

Fixes llvm#690

Assisted-by: Gemini
Copy link
Contributor

@Keenuts Keenuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a suggestion to improve usability

@s-perron s-perron requested a review from Keenuts February 17, 2026 21:13
@s-perron s-perron merged commit 5558958 into llvm:main Feb 19, 2026
7 of 12 checks passed
@s-perron s-perron deleted the miplevels branch February 19, 2026 16:40
@Icohedron
Copy link
Contributor

This PR broke the tests introduced by #648
The tests introduced by that PR are now failing on the CI machines with errors like

# .---command stderr------------
# | YAML:14:5: error: Buffer 'Output' size (16) does not match OutputProps dimensions (256)
# |   - Name: Output
# |     ^
# | gpu-exec: error: invalid argument
# `-----------------------------

log: https://github.com/llvm/offload-test-suite/actions/runs/22190060194/job/64174939577#step:12:439

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.

[Vulkan][DXC] Feature/Textures/Texture2D.Sample* tests fail on all machines

4 participants

Comments