[llvm-branch-commits] [clang] [HLSL] Implement TextureCubeArray resource type (PR #218521)

Deric C. via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 26 16:57:05 PDT 2026


================
@@ -828,6 +828,27 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
                      /*IsArray=*/false, ResourceDimension::Cube)
         .completeDefinition();
   });
+
+  // TextureCubeArray — same as TextureCube but IsArray=true, so locations gain
+  // an array slice and are float4.
+  Decl = BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "TextureCubeArray")
+             .addSimpleTemplateParams({"element_type"}, {Float4Ty},
+                                      TypedBufferConcept)
----------------
Icohedron wrote:

It is true that Textures are not TypedBuffers. However, having the `TypedBufferConcept` does not imply it is a TypedBuffer. The `TypedBufferConcept` is just a constraint on the allowed element types for the resource.

https://github.com/llvm/llvm-project/pull/218521


More information about the llvm-branch-commits mailing list