-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[HLSL] Update Frontend to support version 1.2 of root signature #160616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 24 commits
787c776
57fd710
d72adfe
23803b7
fefd58c
13d945d
1d0cbd3
e530bcc
79ea587
367ac8c
a08c05e
159388d
905d5d3
b73bf24
bc393fd
e8f7b94
589668e
e8b973f
190cfcd
79e9564
1b1c37d
daa5714
32a2c89
11770c5
09eb8f3
c374634
0e80c63
a2a00a9
c8f7e13
900c796
b85b876
deb02eb
2113929
6d87804
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,36 @@ | ||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-rootsignature -ast-dump \ | ||
// RUN: -fdx-rootsignature-version=rootsig_1_1 \ | ||
// RUN: -hlsl-entry EntryRootSig -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_1 | ||
|
||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-rootsignature -ast-dump \ | ||
// RUN: -fdx-rootsignature-version=rootsig_1_0 \ | ||
// RUN: -hlsl-entry EntryRootSig -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_0 | ||
|
||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-rootsignature -ast-dump \ | ||
// RUN: -fdx-rootsignature-version=rootsig_1_2 \ | ||
// RUN: -hlsl-entry EntryRootSig -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_2 | ||
bogner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-rootsignature -ast-dump \ | ||
// RUN: -D CmdRS='"UAV(u0)"'\ | ||
// RUN: -hlsl-entry CmdRS -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=CMD | ||
|
||
// CHECK: -HLSLRootSignatureDecl 0x{{.*}} {{.*}} implicit [[ENTRY_RS_DECL:__hlsl_rootsig_decl_\d*]] | ||
// CHECK-V1_0-SAME: version: 1.0, | ||
// CHECK-V1_1-SAME: version: 1.1, | ||
// CHECK-V1_2-SAME: version: 1.2, | ||
// CHECK-SAME: RootElements{ | ||
// CHECK-SAME: RootCBV(b0, | ||
// CHECK-SAME: space = 0, visibility = All, | ||
// CHECK-V1_0-SAME: flags = DataVolatile | ||
// CHECK-V1_1-SAME: flags = DataStaticWhileSetAtExecute | ||
// CHECK-V1_2-SAME: flags = DataStaticWhileSetAtExecute | ||
// CHECK-SAME: ) | ||
// CHECK-SAME: } | ||
#define EntryRootSig "CBV(b0)" | ||
|
||
// CMD: -HLSLRootSignatureDecl 0x{{.*}} {{.*}} implicit [[CMD_RS_DECL:__hlsl_rootsig_decl_\d*]] | ||
// CMD-SAME: version: 1.1, | ||
// CMD-SAME: version: 1.2, | ||
// CMD-SAME: RootElements{ | ||
// CMD-SAME: RootUAV(u0, space = 0, visibility = All, flags = DataVolatile) | ||
// CMD-SAME: } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -ast-dump \ | ||
// RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_1 | ||
// RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_2 | ||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -ast-dump \ | ||
// RUN: -fdx-rootsignature-version=rootsig_1_0 \ | ||
// RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_0 | ||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -ast-dump \ | ||
// RUN: -fdx-rootsignature-version=rootsig_1_1 \ | ||
// RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_1 | ||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -ast-dump \ | ||
// RUN: -fdx-rootsignature-version=rootsig_1_2 \ | ||
// RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_2 | ||
|
||
// This test ensures that the sample root signature is parsed without error and | ||
// the Attr AST Node is created succesfully. If an invalid root signature was | ||
|
@@ -31,6 +34,7 @@ | |
// CHECK: -HLSLRootSignatureDecl 0x{{.*}} {{.*}} implicit [[SAMPLE_RS_DECL:__hlsl_rootsig_decl_\d*]] | ||
// CHECK-V1_0: version: 1.0, | ||
// CHECK-V1_1: version: 1.1, | ||
// CHECK-V1_2: version: 1.2, | ||
// CHECK-SAME: RootElements{ | ||
// CHECK-SAME: RootFlags(AllowInputAssemblerInputLayout | DenyVertexShaderRootAccess), | ||
// CHECK-SAME: RootCBV(b0, | ||
|
@@ -62,6 +66,7 @@ | |
// CHECK-SAME: s0, numDescriptors = 4, space = 1, offset = DescriptorTableOffsetAppend, | ||
// CHECK-V1_0-SAME: flags = DescriptorsVolatile | ||
// CHECK-V1_1-SAME: flags = None | ||
// CHECK-V1_2-SAME: flags = None | ||
// CHECK-SAME: ), | ||
// CHECK-SAME: DescriptorTable( | ||
// CHECK-SAME: numClauses = 1, visibility = All | ||
|
@@ -73,6 +78,9 @@ | |
// CHECK-SAME: s1, filter = Anisotropic, addressU = Wrap, addressV = Wrap, addressW = Wrap, | ||
// CHECK-SAME: mipLODBias = 0.000000e+00, maxAnisotropy = 16, comparisonFunc = LessEqual, | ||
// CHECK-SAME: borderColor = OpaqueWhite, minLOD = 0.000000e+00, maxLOD = 3.402823e+38, space = 0, visibility = All | ||
// CHECK-V1_0-SAME: flags = None | ||
// CHECK-V1_1-SAME: flags = None | ||
// CHECK-V1_2-SAME: flags = None | ||
|
||
// CHECK-SAME: )} | ||
|
||
// CHECK: -RootSignatureAttr 0x{{.*}} {{.*}} [[SAMPLE_RS_DECL]] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also update https://github.com/llvm/llvm-project/blob/main/clang/test/AST/HLSL/RootSignatures-AST.hlsl to ensure the flags field is generated in the ast |
Uh oh!
There was an error while loading. Please reload this page.