[all-commits] [llvm/llvm-project] 7ee53c: [HLSL] Add support for dynamic resources (#221103)

Helena Kotas via All-commits all-commits at lists.llvm.org
Thu Sep 24 18:18:03 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ee53ccefc851c05f3183b1d2cc5bf811cdb62df
      https://github.com/llvm/llvm-project/commit/7ee53ccefc851c05f3183b1d2cc5bf811cdb62df
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    A clang/docs/HLSL/DynamicResources.md
    M clang/docs/HLSL/HLSLDocs.md
    M clang/include/clang/Basic/Builtins.td
    M clang/include/clang/Sema/HLSLExternalSemaSource.h
    M clang/lib/CodeGen/CGHLSLBuiltins.cpp
    M clang/lib/CodeGen/CGHLSLRuntime.h
    M clang/lib/Headers/CMakeLists.txt
    M clang/lib/Headers/hlsl.h
    M clang/lib/Headers/hlsl/hlsl_detail.h
    A clang/lib/Headers/hlsl/hlsl_resources.h
    M clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
    M clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.h
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    M clang/test/AST/HLSL/ByteAddressBuffers-AST.hlsl
    A clang/test/AST/HLSL/DynamicResources-AST.hlsl
    M clang/test/AST/HLSL/StructuredBuffers-AST.hlsl
    M clang/test/AST/HLSL/TypedBuffers-AST.hlsl
    M clang/test/AST/HLSL/matrix-alias.hlsl
    A clang/test/CodeGenHLSL/resources/dynamic-resources.hlsl
    M clang/test/SemaHLSL/Language/InitLists.hlsl
    M clang/test/SemaHLSL/Resources/Textures-SampleCmpLevelZero.hlsl
    A clang/test/SemaHLSL/Resources/dynamic-resources-availability.hlsl
    A clang/test/SemaHLSL/Resources/dynamic-resources.hlsl
    M llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn

  Log Message:
  -----------
  [HLSL] Add support for dynamic resources (#221103)

Adds support for dynamic resources, also known as bindless or directly
indexed resources. The design is described in
https://github.com/llvm/wg-hlsl/issues/204.

The change adds:
- The `ResourceDescriptorHeap` and `SamplerDescriptorHeap` global
symbols, which expose the Shader Model 6.6 descriptor heaps.
- Internal `hlsl::__detail::heap_resource_info` and
`hlsl::__detail::heap_sampler_info` types, which are produced by
indexing the corresponding descriptor heap. HLSL resource and sampler
types can be implicitly constructed from these values.
- Constructors that accept the corresponding internal heap info type for
all currently implemented resource classes.
- Clang builtins `__builtin_hlsl_resource_handlefromheap` and
`__builtin_hlsl_resource_counterhandlefromheap` for creating resource
and counter handles from descriptor heap indices.
- Sema validation and return-type handling for the new builtins.

For DXIL, the built-in function is lowered to
`llvm.dx.resource.handlefromheap`. For SPIR-V, the built-ins are lowered
to `llvm.spv.resource.handlefromheap` and
`llvm.spv.resource.counterhandlefromheap`.

Fixes #133831

Assisted by GPT 5.6 Sol and Claude Opus 4.8.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list