[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add parsing of flags to RootParam (PR #140152)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 20 11:02:02 PDT 2025
================
@@ -91,6 +99,23 @@ struct RootParam {
Register Reg;
uint32_t Space = 0;
ShaderVisibility Visibility = ShaderVisibility::All;
+ RootDescriptorFlags Flags;
+
+ void setDefaultFlags() {
+ assert(Type != ParamType::Sampler &&
+ "Sampler is not a valid type of ParamType");
+ switch (Type) {
+ case ParamType::CBuffer:
+ case ParamType::SRV:
+ Flags = RootDescriptorFlags::DataStaticWhileSetAtExecute;
+ break;
+ case ParamType::UAV:
+ Flags = RootDescriptorFlags::DataVolatile;
+ break;
+ case ParamType::Sampler:
+ break;
+ }
+ }
----------------
joaosaffran wrote:
Are we planning to modify that when we add support for versioning ? Something like:
```C++
if(Version == 1)
Flags = 0;
```
https://github.com/llvm/llvm-project/pull/140152
More information about the llvm-branch-commits
mailing list