⚠️ DRAFT — not ready for pickup. Title still being refined; do not assign or start work yet.
Background
#1039 added multi-mip SRV support for Texture2D / RWTexture2D via PR #1230. Extending the same to TextureCube / TextureCubeArray / Texture3D is genuinely a new-resource-kind workstream, not a small mip extension:
- The shared
ResourceKind enum in include/API/Enums.h does not currently contain any of TextureCube, TextureCubeArray, or Texture3D. No backend (DX/VK/MTL) has any code path for these types — there are zero matches in the first-party tree.
- D3D12 cube textures use
DepthOrArraySize = 6 (cube) or 6*N (cube array) with D3D12_RESOURCE_DIMENSION_TEXTURE2D and D3D12_SRV_DIMENSION_TEXTURECUBE / TEXTURECUBEARRAY. D3D12 3D textures use D3D12_RESOURCE_DIMENSION_TEXTURE3D with DepthOrArraySize = Depth, D3D12_SRV_DIMENSION_TEXTURE3D, and D3D12_UAV_DIMENSION_TEXTURE3D (for RWTexture3D). Per-mip semantics differ: cube has 6 array slices × mips; 3D has depth halving per mip within the single subresource per mip.
- VK needs
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT + arrayLayers = 6 for cube, VK_IMAGE_TYPE_3D for 3D, plus VK_IMAGE_VIEW_TYPE_CUBE / CUBE_ARRAY / _3D.
- MTL needs
MTL::TextureTypeCube / CubeArray / Type3D.
- YAML parser must accept the new kinds. Per-mip upload loops must handle the per-type subresource math (cube:
subresource = mip + slice * MipLevels; 3D: just mip, and depth halves automatically).
- Tests need at least one Load / Sample test per type with multiple mip levels.
Originally added as an AC on #1039 (2026-06-01) and reverted later the same day after scope analysis: the work spans the shared ResourceKind enum + YAML + 3 backends × 3 new resource types × per-type subresource semantics + tests for each (>3 days), large enough that it would obscure the simpler "Texture2D mips done" milestone if folded into #1039.
Acceptance criteria
Notes
Refs #1039, llvm/wg-hlsl#400.
Background
#1039 added multi-mip SRV support for
Texture2D/RWTexture2Dvia PR #1230. Extending the same toTextureCube/TextureCubeArray/Texture3Dis genuinely a new-resource-kind workstream, not a small mip extension:ResourceKindenum ininclude/API/Enums.hdoes not currently contain any ofTextureCube,TextureCubeArray, orTexture3D. No backend (DX/VK/MTL) has any code path for these types — there are zero matches in the first-party tree.DepthOrArraySize = 6(cube) or6*N(cube array) withD3D12_RESOURCE_DIMENSION_TEXTURE2DandD3D12_SRV_DIMENSION_TEXTURECUBE/TEXTURECUBEARRAY. D3D12 3D textures useD3D12_RESOURCE_DIMENSION_TEXTURE3DwithDepthOrArraySize = Depth,D3D12_SRV_DIMENSION_TEXTURE3D, andD3D12_UAV_DIMENSION_TEXTURE3D(forRWTexture3D). Per-mip semantics differ: cube has 6 array slices × mips; 3D has depth halving per mip within the single subresource per mip.VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT+arrayLayers = 6for cube,VK_IMAGE_TYPE_3Dfor 3D, plusVK_IMAGE_VIEW_TYPE_CUBE/CUBE_ARRAY/_3D.MTL::TextureTypeCube/CubeArray/Type3D.subresource = mip + slice * MipLevels; 3D: justmip, and depth halves automatically).Originally added as an AC on #1039 (2026-06-01) and reverted later the same day after scope analysis: the work spans the shared
ResourceKindenum + YAML + 3 backends × 3 new resource types × per-type subresource semantics + tests for each (>3 days), large enough that it would obscure the simpler "Texture2D mips done" milestone if folded into #1039.Acceptance criteria
ResourceKind::TextureCube,TextureCubeArray,Texture3D(andRWTexture3Dif UAV writes are in scope) toinclude/API/Enums.h.lib/Support/Pipeline.cppto accept the new strings.getDXDimension,getResourceDescription,getSRVDescription,getUAVDescription, and the per-mip upload loop inbindResources/createResourcefor cube + cube-array + 3D semantics.getVkImageType,getVkImageViewType, and image-create-info construction inlib/API/VK/Device.cppfor cube-compatible + 3D.lib/API/MTL/MTLDevice.cpp(start asllvm_unreachablestub for convergence).MipLevels > 1undertest/Feature/Textures/.Notes
Refs #1039, llvm/wg-hlsl#400.