[all-commits] [llvm/llvm-project] 20d701: [HLSL][SPIR-V] Implement vk::ext_builtin_input att...

Nathan Gauër via All-commits all-commits at lists.llvm.org
Wed Jun 4 04:22:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 20d70196c9a4da344d0944f3c78447c3bd7079c7
      https://github.com/llvm/llvm-project/commit/20d70196c9a4da344d0944f3c78447c3bd7079c7
  Author: Nathan Gauër <brioche at google.com>
  Date:   2025-06-04 (Wed, 04 Jun 2025)

  Changed paths:
    M clang/include/clang/Basic/AddressSpaces.h
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Basic/AttributeCommonInfo.h
    M clang/include/clang/Sema/SemaHLSL.h
    M clang/lib/AST/Type.cpp
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Basic/Attributes.cpp
    M clang/lib/Basic/TargetInfo.cpp
    M clang/lib/Basic/Targets/AArch64.h
    M clang/lib/Basic/Targets/AMDGPU.cpp
    M clang/lib/Basic/Targets/DirectX.h
    M clang/lib/Basic/Targets/NVPTX.h
    M clang/lib/Basic/Targets/SPIR.h
    M clang/lib/Basic/Targets/SystemZ.h
    M clang/lib/Basic/Targets/TCE.h
    M clang/lib/Basic/Targets/WebAssembly.h
    M clang/lib/Basic/Targets/X86.h
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    M clang/lib/CodeGen/CGHLSLRuntime.h
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    A clang/test/CodeGenHLSL/vk-input-builtin.hlsl
    A clang/test/SemaHLSL/vk-ext-input-builtin.hlsl
    M clang/test/SemaTemplate/address_space-dependent.cpp
    A llvm/test/CodeGen/SPIRV/hlsl-intrinsics/vk-ext-builtin-input.ll

  Log Message:
  -----------
  [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (#138530)

This variable attribute is used in HLSL to add Vulkan specific builtins
in a shader.
The attribute is documented here:

https://github.com/microsoft/hlsl-specs/blob/17727e88fd1cb09013cb3a144110826af05f4dd5/proposals/0011-inline-spirv.md

Those variable, even if marked as `static` are externally initialized by
the pipeline/driver/GPU. This is handled by moving them to a specific
address space `hlsl_input`, also added by this commit.

The design for input variables in Clang can be found here:
https://github.com/llvm/wg-hlsl/blob/355771361ef69259fef39a65caef8bff9cb4046d/proposals/0019-spirv-input-builtin.md


Co-authored-by: Justin Bogner <mail at justinbogner.com>



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