[all-commits] [llvm/llvm-project] 7dbfa7: [HLSL] Add handle initialization for simple resour...

Helena Kotas via All-commits all-commits at lists.llvm.org
Thu Oct 17 17:59:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7dbfa7b981417773d01c52b0d716d592870081bb
      https://github.com/llvm/llvm-project/commit/7dbfa7b981417773d01c52b0d716d592870081bb
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2024-10-17 (Thu, 17 Oct 2024)

  Changed paths:
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/Type.cpp
    M clang/lib/CodeGen/CGDeclCXX.cpp
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    M clang/lib/CodeGen/CGHLSLRuntime.h
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    M clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
    M clang/test/CodeGenHLSL/builtins/StructuredBuffer-constructor.hlsl

  Log Message:
  -----------
  [HLSL] Add handle initialization for simple resource declarations (#111207)

Adds `@_init_resource_bindings()` function to module initialization that
includes `handle.fromBinding` intrinsic calls for simple resource
declarations. Arrays of resources or resources inside user defined types
are not supported yet.

While this unblocks our progress on [Compile a runnable shader from
clang](https://github.com/llvm/wg-hlsl/issues/7) milestone, this is
probably not the way we would like to handle resource binding
initialization going forward. Ideally, it should be done via the
resource class constructors in order to support dynamic resource binding
or unbounded arrays if resources.

Depends on PRs #110327 and #111203.

Part 1 of #105076



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