[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 17:00:22 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:
The [textures and samplers proposal](https://github.com/llvm/wg-hlsl/blob/main/proposals/0037-texture-and-sampler-types.md#template-parameter-validation) states as such:
> Texture template parameters are constrained using the same [__is_typed_resource_element_compatible concept](https://github.com/llvm/wg-hlsl/blob/main/proposals/0011-resource-element-type-validation.md) as Buffer and RWBuffer.
And in the linked [__is_typed_resource_element_compatible concept](https://github.com/llvm/wg-hlsl/blob/main/proposals/0011-resource-element-type-validation.md#introduction) proposal, it says in the introduction:
> RWBuffer, along with some other buffers and textures, fall under the "typed buffer" category.
https://github.com/llvm/llvm-project/pull/218521
More information about the llvm-branch-commits
mailing list