Browse Source

Validation test fixes for opcode changes.

Tex Riddell 8 years ago
parent
commit
c2745c5fa8

+ 2 - 2
tools/clang/test/HLSL/dxil_validation/InnerCoverage.ll

@@ -8,8 +8,8 @@ target triple = "dxil-ms-dx"
 ; Function Attrs: alwaysinline nounwind
 define void @main(float %b, i32 %c, i32* nocapture readnone dereferenceable(4) %cover) #0 {
 entry:
-  %0 = call i32 @dx.op.coverage.i32(i32 147)  ; Coverage()
-  %1 = call i32 @dx.op.innercoverage.i32(i32 148)  ; InnerCoverage()
+  %0 = call i32 @dx.op.coverage.i32(i32 93)  ; Coverage()
+  %1 = call i32 @dx.op.innercoverage.i32(i32 94)  ; InnerCoverage()
   %and = and i32 %1, %0
   call void @dx.op.storeOutput.i32(i32 5, i32 0, i32 0, i8 0, i32 %and)  ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
   ret void

+ 17 - 16
tools/clang/unittests/HLSL/ValidationTest.cpp

@@ -363,7 +363,7 @@ public:
 
     CComPtr<IDxcBlob> pText;
 
-    RewriteAssemblyToText(pSource, pShaderModel, pLookFor, pReplacement, &pText);
+    RewriteAssemblyToText(pSource, pShaderModel, pLookFor, pReplacement, &pText, bRegex);
 
     CComPtr<IDxcAssembler> pAssembler;
     CComPtr<IDxcOperationResult> pAssembleResult;
@@ -734,32 +734,32 @@ TEST_F(ValidationTest, StructBufGlobalCoherentAndCounter) {
 TEST_F(ValidationTest, StructBufStrideAlign) {
     RewriteAssemblyCheckMsg(
       L"..\\CodeGenHLSL\\struct_buf1.hlsl", "ps_6_0",
-      "!7 = !{i32 1, i32 52}",
-      "!7 = !{i32 1, i32 50}",
+      "= !{i32 1, i32 52}",
+      "= !{i32 1, i32 50}",
       "structured buffer element size must be a multiple of 4 bytes (actual size 50 bytes)");
 }
 
 TEST_F(ValidationTest, StructBufStrideOutOfBound) {
     RewriteAssemblyCheckMsg(
       L"..\\CodeGenHLSL\\struct_buf1.hlsl", "ps_6_0",
-      "!7 = !{i32 1, i32 52}",
-      "!7 = !{i32 1, i32 2052}",
+      "= !{i32 1, i32 52}",
+      "= !{i32 1, i32 2052}",
       "structured buffer elements cannot be larger than 2048 bytes (actual size 2052 bytes)");
 }
 
 TEST_F(ValidationTest, StructBufLoadCoordinates) {
     RewriteAssemblyCheckMsg(
       L"..\\CodeGenHLSL\\struct_buf1.hlsl", "ps_6_0",
-      "bufferLoad.f32(i32 69, %dx.types.Handle %buf1_texture_structbuf, i32 1, i32 8)",
-      "bufferLoad.f32(i32 69, %dx.types.Handle %buf1_texture_structbuf, i32 1, i32 undef)",
+      "bufferLoad.f32(i32 70, %dx.types.Handle %buf1_texture_structbuf, i32 1, i32 8)",
+      "bufferLoad.f32(i32 70, %dx.types.Handle %buf1_texture_structbuf, i32 1, i32 undef)",
       "structured buffer require 2 coordinates");
 }
 
 TEST_F(ValidationTest, StructBufStoreCoordinates) {
     RewriteAssemblyCheckMsg(
       L"..\\CodeGenHLSL\\struct_buf1.hlsl", "ps_6_0",
-      "bufferStore.f32(i32 70, %dx.types.Handle %buf2_UAV_structbuf, i32 0, i32 0",
-      "bufferStore.f32(i32 70, %dx.types.Handle %buf2_UAV_structbuf, i32 0, i32 undef",
+      "bufferStore.f32(i32 71, %dx.types.Handle %buf2_UAV_structbuf, i32 0, i32 0",
+      "bufferStore.f32(i32 71, %dx.types.Handle %buf2_UAV_structbuf, i32 0, i32 undef",
       "structured buffer require 2 coordinates");
 }
 
@@ -862,16 +862,17 @@ TEST_F(ValidationTest, PsOutputSemantic) {
 TEST_F(ValidationTest, ArrayOfSVTarget) {
     RewriteAssemblyCheckMsg(
       L"..\\CodeGenHLSL\\targetArray.hlsl", "ps_6_0",
-      "i32 6, !\"SV_Target\", i8 9, i8 16, !36, i8 0, i32 1",
-      "i32 6, !\"SV_Target\", i8 9, i8 16, !36, i8 0, i32 2",
-      "Pixel shader output registers are not indexable.");
+      "i32 6, !\"SV_Target\", i8 9, i8 16, !([0-9]+), i8 0, i32 1",
+      "i32 6, !\"SV_Target\", i8 9, i8 16, !\\1, i8 0, i32 2",
+      "Pixel shader output registers are not indexable.",
+      /*bRegex*/true);
 }
 
 TEST_F(ValidationTest, InfiniteLog) {
     RewriteAssemblyCheckMsg(
       L"..\\CodeGenHLSL\\intrinsic_val_imm.hlsl", "ps_6_0",
-      "op.unary.f32(i32 22, float %3)",
-      "op.unary.f32(i32 22, float 0x7FF0000000000000)",
+      "op.unary.f32(i32 23, float %3)",
+      "op.unary.f32(i32 23, float 0x7FF0000000000000)",
       "No indefinite logarithm");
 }
 
@@ -894,8 +895,8 @@ TEST_F(ValidationTest, InfiniteAcos) {
 TEST_F(ValidationTest, InfiniteDdxDdy) {
     RewriteAssemblyCheckMsg(
       L"..\\CodeGenHLSL\\intrinsic_val_imm.hlsl", "ps_6_0",
-      "op.unary.f32(i32 86, float %3)",
-      "op.unary.f32(i32 86, float 0x7FF0000000000000)",
+      "op.unary.f32(i32 85, float %3)",
+      "op.unary.f32(i32 85, float 0x7FF0000000000000)",
       "No indefinite derivative calculation");
 }