File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
llvm/include/llvm/Frontend/HLSL Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,14 @@ struct RootDescriptor {
50
50
dxbc::ShaderVisibility Visibility = dxbc::ShaderVisibility::All;
51
51
dxbc::RootDescriptorFlags Flags;
52
52
53
- void setDefaultFlags () {
53
+ void setDefaultFlags (dxbc::RootSignatureVersion Version) {
54
+ if (Version == dxbc::RootSignatureVersion::V1_0) {
55
+ Flags = dxbc::RootDescriptorFlags::DataVolatile;
56
+ return ;
57
+ }
58
+
59
+ assert (Version == llvm::dxbc::RootSignatureVersion::V1_1 &&
60
+ " Specified an invalid root signature version" );
54
61
switch (Type) {
55
62
case DescriptorType::CBuffer:
56
63
case DescriptorType::SRV:
@@ -83,7 +90,16 @@ struct DescriptorTableClause {
83
90
uint32_t Offset = DescriptorTableOffsetAppend;
84
91
dxbc::DescriptorRangeFlags Flags;
85
92
86
- void setDefaultFlags () {
93
+ void setDefaultFlags (dxbc::RootSignatureVersion Version) {
94
+ if (Version == dxbc::RootSignatureVersion::V1_0) {
95
+ Flags = dxbc::DescriptorRangeFlags::DescriptorsVolatile;
96
+ if (Type != ClauseType::Sampler)
97
+ Flags |= dxbc::DescriptorRangeFlags::DataVolatile;
98
+ return ;
99
+ }
100
+
101
+ assert (Version == dxbc::RootSignatureVersion::V1_1 &&
102
+ " Specified an invalid root signature version" );
87
103
switch (Type) {
88
104
case ClauseType::CBuffer:
89
105
case ClauseType::SRV:
You can’t perform that action at this time.
0 commit comments