[all-commits] [llvm/llvm-project] ec15cd: [SPIRV][HLSL] Add Sema and CodeGen for implicit ty...
Steven Perron via All-commits
all-commits at lists.llvm.org
Thu Oct 9 09:31:21 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ec15cdfb328c504298d0ab14e287448804e6bea5
https://github.com/llvm/llvm-project/commit/ec15cdfb328c504298d0ab14e287448804e6bea5
Author: Steven Perron <stevenperron at google.com>
Date: 2025-10-09 (Thu, 09 Oct 2025)
Changed paths:
M clang/include/clang/AST/HLSLResource.h
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/Builtins.td
M clang/lib/CodeGen/CGHLSLBuiltins.cpp
M clang/lib/CodeGen/CGHLSLRuntime.cpp
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/StructuredBuffers-AST.hlsl
M clang/test/AST/HLSL/vk_binding_attr.hlsl
M clang/test/CodeGenHLSL/resources/StructuredBuffers-constructors.hlsl
A clang/test/CodeGenHLSL/resources/res-array-rw-counter.hlsl
M clang/test/CodeGenHLSL/vk_binding_attr.hlsl
Log Message:
-----------
[SPIRV][HLSL] Add Sema and CodeGen for implicit typed buffer counters (#162291)
This commit implements the Sema and CodeGen portions of the typed buffer
counter proposal described in the HLSL WG proposal 0023.
This change introduces the necessary Sema and CodeGen logic to handle
implicit counter variables for typed buffers. This includes:
- Extending `HLSLResourceBindingAttr` to store the implicit counter
binding order ID.
- Introducing the
`__builtin_hlsl_resource_counterhandlefromimplicitbinding`
builtin.
- Updating `SemaHLSL` to correctly initialize global resource
declarations
and resource arrays with implicit counter buffers.
- Adding CodeGen support for the new builtin, which generates a
`llvm.spv.resource.counterhandlefromimplicitbinding` intrinsic for the
SPIR-V target and aliases the main resource handle for the DXIL target.
- Adding and updating tests to verify the new functionality.
Fixes #137032
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