[clang] [HLSL] Add Texture3D and RWTexture3D types (PR #220438)
Finn Plummer via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 9 13:48:58 PDT 2026
================
@@ -322,6 +322,13 @@ static const TextureTypeInfo TextureTypes[] = {
/*IsArray=*/false, /*IsROV=*/false,
TemplateShape::ElementTypeAndSampleCount,
TexCap::LoadMS | TexCap::Subscript},
+ {"Texture3D", ResourceClass::SRV, ResourceDimension::Dim3D,
+ /*IsArray=*/false, /*IsROV=*/false, TemplateShape::ElementType,
+ TexCap::Load | TexCap::Subscript | TexCap::Mips | TexCap::Sample |
+ TexCap::CalcLOD | TexCap::GetDims},
+ {"RWTexture3D", ResourceClass::UAV, ResourceDimension::Dim3D,
+ /*IsArray=*/false, /*IsROV=*/false, TemplateShape::ElementType,
+ TexCap::LoadRW | TexCap::Subscript | TexCap::GetDims},
----------------
inbelic wrote:
It seems like from [`HLSLBuiltinTypeDeclBuilder.cpp`](https://github.com/llvm/llvm-project/blob/173a02c755bf91fecf90ac4df972128baea91da8/clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp#L2214) that the `GetDimension` methods are not actually currently supported for 3D texture types? Is that planned to be addressed in another pr?
Locally I get:
```
error: no member named 'GetDimensions' in 'hlsl::Texture3D<>'
error: no member named 'GetDimensions' in 'hlsl::RWTexture3D<>'
```
https://github.com/llvm/llvm-project/pull/220438
More information about the cfe-commits
mailing list