Skip to content

Commit 26d7dd9

Browse files
author
Greg Roth
authored
Ready tests for 6.9 version (#6465)
In experimenting with bumping the max shader model version in the mesh nodes branch, many unrelated tests started failing due to being overly-sensitive to ordering, particularly for metadata. This uses regular expressions or order-independent checks to make these tests more robust so they will be able to handle the change to 6.9 when it comes to main, whatever form that takes. Followup to #6432
1 parent 080aeb7 commit 26d7dd9

File tree

4 files changed

+130
-101
lines changed

4 files changed

+130
-101
lines changed

tools/clang/test/CodeGenDXIL/hlsl/objects/NodeObjects/node-objects-metdata.hlsl renamed to tools/clang/test/CodeGenDXIL/hlsl/objects/NodeObjects/node-objects-metadata.hlsl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ struct RECORD1
5959

6060
// FCGLMD-DAG: !{void (%"struct.DispatchNodeInputRecord<RECORD>"*)* @node_DispatchNodeInputRecord, i32 15, i32 1024, i32 1, i32 1, i32 1, i1 false, !"node_DispatchNodeInputRecord", i32 0, !"", i32 0, i32 -1, i32 64, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 97, i32 0, i32 16, i32 0, i32 0, i32 0, i32 4}
6161

62-
// MD: !{void ()* @node_DispatchNodeInputRecord, !"node_DispatchNodeInputRecord", null, null, ![[DispatchNodeInput:[0-9]+]]}
63-
// MD: ![[DispatchNodeInput]] = !{i32 8, i32 15, i32 13, i32 1, i32 15, !{{[0-9]+}}, i32 16, i32 -1, i32 18, !{{[0-9]+}}, i32 20, ![[EntryInputs:[0-9]+]], i32 4, !{{[0-9]+}}, i32 5, !{{[0-9]+}}}
64-
// MD: ![[EntryInputs]] = !{![[EntryInputs0:[0-9]+]]}
65-
// MD: ![[EntryInputs0]] = !{i32 1, i32 97, i32 2, ![[EntryInputs0Record:[0-9]+]]}
66-
// MD: ![[EntryInputs0Record]] = !{i32 0, i32 16, i32 2, i32 4}
62+
// MD-DAG: !{void ()* @node_DispatchNodeInputRecord, !"node_DispatchNodeInputRecord", null, null, ![[DispatchNodeInput:[0-9]+]]}
63+
// MD-DAG: ![[DispatchNodeInput]] = !{i32 8, i32 15, i32 13, i32 1, i32 15, !{{[0-9]+}}, i32 16, i32 -1, i32 18, !{{[0-9]+}}, i32 20, ![[EntryInputs:[0-9]+]], i32 4, !{{[0-9]+}}, i32 5, !{{[0-9]+}}}
64+
// MD-DAG: ![[EntryInputs]] = !{![[EntryInputs0:[0-9]+]]}
65+
// MD-DAG: ![[EntryInputs0]] = !{i32 1, i32 97, i32 2, ![[EntryInputs0Record:[0-9]+]]}
66+
// MD-DAG: ![[EntryInputs0Record]] = !{i32 0, i32 16, i32 2, i32 4}
6767

6868
[Shader("node")]
6969
[NumThreads(1024,1,1)]
@@ -78,10 +78,10 @@ void node_DispatchNodeInputRecord(DispatchNodeInputRecord<RECORD> input)
7878

7979
// FCGLMD-DAG: !{void (%struct.EmptyNodeInput*)* @node_EmptyNodeInput, i32 15, i32 2, i32 1, i32 1, i32 2, i1 true, !"node_EmptyNodeInput", i32 0, !"", i32 0, i32 -1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0}
8080

81-
// MD: !{void ()* @node_EmptyNodeInput, !"node_EmptyNodeInput", null, null, ![[EmptyNodeInput:[0-9]+]]}
82-
// MD: ![[EmptyNodeInput]] = !{i32 8, i32 15, i32 13, i32 2, i32 14, i1 true, i32 15, !{{[0-9]+}}, i32 16, i32 -1, i32 20, ![[EntryInputs:[0-9]+]], i32 4, !{{[0-9]+}}, i32 5, !{{[0-9]+}}}
83-
// MD: ![[EntryInputs]] = !{![[EntryInputs0:[0-9]+]]}
84-
// MD: ![[EntryInputs0]] = !{i32 1, i32 9}
81+
// MD-DAG: !{void ()* @node_EmptyNodeInput, !"node_EmptyNodeInput", null, null, ![[EmptyNodeInput:[0-9]+]]}
82+
// MD-DAG: ![[EmptyNodeInput]] = !{i32 8, i32 15, i32 13, i32 2, i32 14, i1 true, i32 15, !{{[0-9]+}}, i32 16, i32 -1, i32 20, ![[EntryInputs:[0-9]+]], i32 4, !{{[0-9]+}}, i32 5, !{{[0-9]+}}}
83+
// MD-DAG: ![[EntryInputs]] = !{![[EntryInputs0:[0-9]+]]}
84+
// MD-DAG: ![[EntryInputs0]] = !{i32 1, i32 9}
8585

8686
[Shader("node")]
8787
[NodeLaunch("coalescing")]

tools/clang/test/HLSLFileCheck/hlsl/workgraph/case085_thread_emptynodeinput.hlsl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void node085_thread_emptynodeinput(EmptyNodeInput input)
2828

2929
// Metadata for node
3030
// ------------------------------------------------------------------
31-
// CHECK: = !{void ()* @node085_thread_emptynodeinput, !"node085_thread_emptynodeinput", null, null, [[ATTRS:![0-9]+]]}
31+
// CHECK-DAG: = !{void ()* @node085_thread_emptynodeinput, !"node085_thread_emptynodeinput", null, null, [[ATTRS:![0-9]+]]}
3232

3333
// Metadata for node attributes
3434
// Arg #1: ShaderKind Tag (8)
@@ -39,16 +39,13 @@ void node085_thread_emptynodeinput(EmptyNodeInput input)
3939
// Arg #n: NodeInputs Tag (20)
4040
// Arg #n+1: NodeInputs (metadata)
4141
// ------------------------------------------------------------------
42-
// CHECK: [[ATTRS]] = !{
43-
// CHECK-SAME: i32 8, i32 15, i32 13, i32 2,
44-
// CHECK-SAME: i32 20, [[NODE_IN:![0-9]+]]
45-
// CHECK-SAME: }
42+
// CHECK-DAG: [[ATTRS]] = !{{{.*}}i32 8, i32 15, i32 13, i32 2,{{.*}}i32 20, [[NODE_IN:![0-9]+]]{{.*}}}
4643

4744
// NodeInputs
4845
// Arg #1: NodeIOKind Tag (1)
4946
// Arg #2: EmptyNodeInput (9)
5047
// Arg #3: NodeInputMaxRecordArraySize Tag (2)
5148
// Arg #4: MaxRecordArraySize = 1
5249
// ------------------------------------------------------------------
53-
// CHECK: [[NODE_IN]] = !{[[INPUT0:![0-9]+]]}
54-
// CHECK: [[INPUT0]] = !{i32 1, i32 9}
50+
// CHECK-DAG: [[NODE_IN]] = !{[[INPUT0:![0-9]+]]}
51+
// CHECK-DAG: [[INPUT0]] = !{i32 1, i32 9}

tools/clang/test/SemaHLSL/hlsl/objects/texture/CalculateLODExtraDiag.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void node02()
8686

8787
// expected-note@+2 {{entry function defined here}}
8888
[Shader("vertex")]
89-
float4 vs(float2 a :A) :SV_POSTION {
89+
float4 vs(float2 a :A) :SV_Position {
9090
float r = 0;
9191
if (1>3)
9292
// expected-error@+1 {{Intrinsic CalculateLevelOfDetail potentially used by 'vs' requires derivatives - only available in pixel, compute, amplification, mesh, or broadcast node shaders}}

0 commit comments

Comments
 (0)