Skip to content

Ready tests for 6.9 version#6465

Merged
pow2clk merged 5 commits intomicrosoft:mainfrom
pow2clk:ready-for-6.9
Oct 14, 2024
Merged

Ready tests for 6.9 version#6465
pow2clk merged 5 commits intomicrosoft:mainfrom
pow2clk:ready-for-6.9

Conversation

@pow2clk
Copy link
Copy Markdown
Collaborator

@pow2clk pow2clk commented Mar 26, 2024

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

Greg Roth added 4 commits March 26, 2024 10:02
node shader validation tests depended heavily on metadata numbers and
order. This make them robust so they can work with the 6.9 changes or
without
deduplication of the 1,9 tuple made the test fail. Using -DAG checks
allows the order to work anyway
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff e4fa1c518413a3ca871a1b1699308b6db0ede892 b94408dcb6dbbcb6fa84d4efb1440b45280656a1 -- tools/clang/unittests/HLSL/ValidationTest.cpp
View the diff from clang-format here.
diff --git a/tools/clang/unittests/HLSL/ValidationTest.cpp b/tools/clang/unittests/HLSL/ValidationTest.cpp
index 26bc6e88..aeb83571 100644
--- a/tools/clang/unittests/HLSL/ValidationTest.cpp
+++ b/tools/clang/unittests/HLSL/ValidationTest.cpp
@@ -4274,7 +4274,7 @@ TEST_F(ValidationTest, ComputeNodeCompatibility) {
       {"!\"node01\", null, null, !([0-9]+)}\n"
        "!\\1 = !{i32 8, i32 15"}, // original: node shader
       {"!\"node01\", null, null, !\\1}\n"
-       "!\\1 = !{i32 8, i32 5"},  // changed to: compute shader
+       "!\\1 = !{i32 8, i32 5"}, // changed to: compute shader
       "Compute entry 'node01' has unexpected node shader metadata", true);
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\compute_node_compatibility.hlsl", "lib_6_8",
@@ -4282,7 +4282,7 @@ TEST_F(ValidationTest, ComputeNodeCompatibility) {
       {"!\"node02\", null, null, !([0-9]+)}\n"
        "!\\1 = !{i32 8, i32 15"}, // original: node shader
       {"!\"node02\", null, null, !\\1}\n"
-       "!\\1 = !{i32 8, i32 5"},  // changed to: compute shader
+       "!\\1 = !{i32 8, i32 5"}, // changed to: compute shader
       "Compute entry 'node02' has unexpected node shader metadata", true);
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\compute_node_compatibility.hlsl", "lib_6_8",
@@ -4290,7 +4290,7 @@ TEST_F(ValidationTest, ComputeNodeCompatibility) {
       {"!\"node03\", null, null, !([0-9]+)}\n"
        "!\\1 = !{i32 8, i32 15"}, // original: node shader
       {"!\"node03\", null, null, !\\1}\n"
-       "!\\1 = !{i32 8, i32 5"},  // changed to: compute shader
+       "!\\1 = !{i32 8, i32 5"}, // changed to: compute shader
       "Compute entry 'node03' has unexpected node shader metadata", true);
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\compute_node_compatibility.hlsl", "lib_6_8",
@@ -4298,7 +4298,7 @@ TEST_F(ValidationTest, ComputeNodeCompatibility) {
       {"!\"node04\", null, null, !([0-9]+)}\n"
        "!\\1 = !{i32 8, i32 15"}, // original: node shader
       {"!\"node04\", null, null, !\\1}\n"
-       "!\\1 = !{i32 8, i32 5"},  // changed to: compute shader
+       "!\\1 = !{i32 8, i32 5"}, // changed to: compute shader
       "Compute entry 'node04' has unexpected node shader metadata", true);
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\compute_node_compatibility.hlsl", "lib_6_8",
@@ -4307,8 +4307,8 @@ TEST_F(ValidationTest, ComputeNodeCompatibility) {
        "!\\1 = !{i32 8, i32 15, i32 13, i32 2"}, // original: node shader
                                                  // coalesing launch type
       {"!\"node04\", null, null, !\\1}\n"
-       "!\\1 = !{i32 8, i32 5, i32 13, i32 3"},  // changed to: compute shader
-                                                 // thread launch type
+       "!\\1 = !{i32 8, i32 5, i32 13, i32 3"}, // changed to: compute shader
+                                                // thread launch type
       "Compute entry 'node04' has unexpected node shader metadata", true);
 }
 
@@ -4419,11 +4419,13 @@ TEST_F(ValidationTest, NodeInputMultiplicity) {
        "!\\2 = !{!([0-9]+)}",                   // input records
        "= !{i32 1, i32 33, i32 2, !([0-9]+)}"}, // end of output
       {"= !{i32 8, i32 15, i32 13, i32 1,\\1i32 20, !\\2\\3"
-       "!\\2 = !{!\\4, !100}",                    // multiple input records
+       "!\\2 = !{!\\4, !100}", // multiple input records
        "= !{i32 1, i32 33, i32 2, !\\1}\n"
-       "!100 = !{i32 1, i32 97, i32 2, !\\1}\n"}, // extra DispatchNodeInputRecord
+       "!100 = !{i32 1, i32 97, i32 2, !\\1}\n"}, // extra
+                                                  // DispatchNodeInputRecord
       "node shader 'node01' may not have more than one input record \\(2 are "
-      "declared\\)", true);
+      "declared\\)",
+      true);
 
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\node_input_compatibility.hlsl", "lib_6_8",
@@ -4432,11 +4434,12 @@ TEST_F(ValidationTest, NodeInputMultiplicity) {
        "!\\2 = !{!([0-9]+)}",                   // input records
        "= !{i32 1, i32 33, i32 2, !([0-9]+)}"}, // end of output
       {"= !{i32 8, i32 15, i32 13, i32 1,\\1i32 20, !\\2\\3"
-       "!\\2 = !{!\\4, !100}",                    // multiple input records
+       "!\\2 = !{!\\4, !100}", // multiple input records
        "= !{i32 1, i32 33, i32 2, !\\1}\n"
        "!100 = !{i32 1, i32 9, i32 2, !\\1}\n"}, // extra EmptyNodeInput
       "node shader 'node01' may not have more than one input record \\(2 are "
-      "declared\\)", true);
+      "declared\\)",
+      true);
 
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\node_input_compatibility.hlsl", "lib_6_8",
@@ -4445,11 +4448,12 @@ TEST_F(ValidationTest, NodeInputMultiplicity) {
        "!\\2 = !{!([0-9]+)}",                   // input records
        "= !{i32 1, i32 33, i32 2, !([0-9]+)}"}, // end of output
       {"= !{i32 8, i32 15, i32 13, i32 2,\\1i32 20, !\\2\\3"
-       "!\\2 = !{!\\4, !100}",                    // multiple input records
+       "!\\2 = !{!\\4, !100}", // multiple input records
        "= !{i32 1, i32 33, i32 2, !\\1}\n"
        "!100 = !{i32 1, i32 65, i32 2, !\\1}\n"}, // extra GroupNodeInputRecords
       "node shader 'node02' may not have more than one input record \\(2 are "
-      "declared\\)", true);
+      "declared\\)",
+      true);
 
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\node_input_compatibility.hlsl", "lib_6_8",
@@ -4458,11 +4462,12 @@ TEST_F(ValidationTest, NodeInputMultiplicity) {
        "!\\2 = !{!([0-9]+)}",                   // input records
        "= !{i32 1, i32 33, i32 2, !([0-9]+)}"}, // end of output
       {"= !{i32 8, i32 15, i32 13, i32 2,\\1i32 20, !\\2\\3"
-       "!\\2 = !{!\\4, !100}",                    // multiple input records
+       "!\\2 = !{!\\4, !100}", // multiple input records
        "= !{i32 1, i32 33, i32 2, !\\1}\n"
        "!100 = !{i32 1, i32 9, i32 2, !\\1}\n"}, // extra EmptyNodeInput
       "node shader 'node02' may not have more than one input record \\(2 are "
-      "declared\\)", true);
+      "declared\\)",
+      true);
 
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\node_input_compatibility.hlsl", "lib_6_8",
@@ -4471,11 +4476,12 @@ TEST_F(ValidationTest, NodeInputMultiplicity) {
        "!\\2 = !{!([0-9]+)}",                   // input records
        "= !{i32 1, i32 33, i32 2, !([0-9]+)}"}, // end of output
       {"= !{i32 8, i32 15, i32 13, i32 3,\\1i32 20, !\\2\\3"
-       "!\\2 = !{!\\4, !100}",                    // multiple input records
+       "!\\2 = !{!\\4, !100}", // multiple input records
        "= !{i32 1, i32 33, i32 2, !\\1}\n"
        "!100 = !{i32 1, i32 33, i32 2, !\\1}\n"}, // extra ThreadNodeInputRecord
       "node shader 'node03' may not have more than one input record \\(2 are "
-      "declared\\)", true);
+      "declared\\)",
+      true);
 
   RewriteAssemblyCheckMsg(
       L"..\\DXILValidation\\node_input_compatibility.hlsl", "lib_6_8",
@@ -4484,12 +4490,12 @@ TEST_F(ValidationTest, NodeInputMultiplicity) {
        "!\\2 = !{!([0-9]+)}",                   // input records
        "= !{i32 1, i32 33, i32 2, !([0-9]+)}"}, // end of output
       {"= !{i32 8, i32 15, i32 13, i32 3,\\1i32 20, !\\2\\3"
-       "!\\2 = !{!\\4, !100}",                    // multiple input records
+       "!\\2 = !{!\\4, !100}", // multiple input records
        "= !{i32 1, i32 33, i32 2, !\\1}\n"
        "!100 = !{i32 1, i32 9, i32 2, !\\1}\n"}, // extra EmptyNodeInput
       "node shader 'node03' may not have more than one input record \\(2 are "
-      "declared\\)", true);
-
+      "declared\\)",
+      true);
 }
 
 TEST_F(ValidationTest, CacheInitWithMinPrec) {
  • Check this box to apply formatting changes to this branch.

Copy link
Copy Markdown
Collaborator Author

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tex3d, if you're satisfied with my answers, please resolve the conversations.

@pow2clk pow2clk enabled auto-merge (squash) April 17, 2024 17:44
@pow2clk pow2clk merged commit 26d7dd9 into microsoft:main Oct 14, 2024
@pow2clk pow2clk deleted the ready-for-6.9 branch October 14, 2024 22:01
SjMxr233 pushed a commit to ShaderHelper/DirectXShaderCompiler that referenced this pull request Jul 24, 2025
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 microsoft#6432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants