llvm / llvm/offload-test-suite

Add tests for Texture3D

Open
#1,133 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
18
Forks
39
Avg merge
2d 18h
Merged PRs (30d)
40

Description

## References

- https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/sm5-object-texture3d
- Existing Texture2D offload tests: `offload-test-suite/test/Feature/Textures/Texture2D.*.test.yaml`

## Description

Add runtime GPU offload tests for `Texture3D`, mirroring the existing `Texture2D.*` test coverage. Texture3D uses `float3` locations, `int3` offsets, and `int4` Load locations (xyz + mip). Gather/GatherCmp are **not** available on Texture3D.

## Tasks

- [ ] **Add `Texture3D` to offload-test-suite `ResourceKind`**
- `offload-test-suite/include/Support/Pipeline.h` — add `Texture3D` to `ResourceKind` enum, update `isRaw()`, `isSampler()`, `isTexture()`, `isReadWrite()`, `isSampledTexture()`, and `ScalarEnumerationTraits`
- `offload-test-suite/lib/API/VK/Device.cpp` — add `Texture3D` cases: `VkDescriptorType`, `VkImageViewType` (`VK_IMAGE_VIEW_TYPE_3D`), image creation
- `offload-test-suite/lib/API/DX/Device.cpp` — add `Texture3D` cases: `D3D12_SRV_DIMENSION_TEXTURE3D`, SRV/UAV descriptor setup
- `offload-test-suite/lib/API/MTL/MTLDevice.cpp` — add `Texture3D` case for Metal texture type mapping

- [ ] **Write tests** (`offload-test-suite/test/Feature/Textures/`)
- `Load.test` — `Load(int4)` and `Load(int4, int3)` with offset
- `Sample.test` — `Sample(SamplerState, float3)` with offset and clamp overloads
- `SampleBias.test` — `SampleBias(SamplerState, float3, float)`
- `SampleGrad.test` — `SampleGrad(SamplerState, float3, float3, float3)`
- `SampleCmp.test` — `SampleCmp(SamplerComparisonState, float3, float)`
- `OperatorIndex.test` — `Tex[uint3]` subscript
- `mips.OperatorIndex.test` — `Tex.mips[mip][uint3]`
- `CalculateLevelOfDetail.test` — `CalculateLevelOfDetail(SamplerState, float3)`
- `Sampler.filter.test` — sampler min/mag filter behaviour
- `Sampler.address.test` — sampler address modes
- `Sampler.mips.test` — sampler mip selection

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.