Jelajahi Sumber

Update test to match new mangled function names.

- mangling changed in PR #1492 to fix collision between half and float
- also, name $Globals_buffer changed to $Globals_cbuffer
Tex Riddell 7 tahun lalu
induk
melakukan
1e8be037dc

+ 2 - 2
tools/clang/test/CodeGenHLSL/quick-test/d3dreflect/reflect-lib-1.hlsl

@@ -18,7 +18,7 @@ float4 function2(float4 x : POSITION) : SV_Position { return x + cbval1 + cbval3
 // CHECK:   D3D12_LIBRARY_DESC:
 // CHECK:     FunctionCount: 3
 // CHECK:   ID3D12FunctionReflection:
-// CHECK:     D3D12_FUNCTION_DESC: Name: \01?function0@@YAM$f16@@Z
+// CHECK:     D3D12_FUNCTION_DESC: Name: \01?function0@@YAM$min16f@@Z
 // CHECK:       Shader Version: Library 6.3
 // CHECK:       ConstantBuffers: 1
 // CHECK:       BoundResources: 2
@@ -68,7 +68,7 @@ float4 function2(float4 x : POSITION) : SV_Position { return x + cbval1 + cbval3
 // CHECK:         Dimension: D3D_SRV_DIMENSION_TEXTURE1D
 // CHECK:         uFlags: 0xc
 // CHECK:   ID3D12FunctionReflection:
-// CHECK:     D3D12_FUNCTION_DESC: Name: \01?function1@@YAMMF@Z
+// CHECK:     D3D12_FUNCTION_DESC: Name: \01?function1@@YAMM$min12i@@Z
 // CHECK:       Shader Version: Library 6.3
 // CHECK:       ConstantBuffers: 1
 // CHECK:       BoundResources: 4

+ 1 - 1
tools/clang/test/CodeGenHLSL/quick-test/global-var-write-test03.hlsl

@@ -2,7 +2,7 @@
 
 // CHECK: {{.*cbvar.*}} = constant float 0.000000e+00, align 4
 // CHECK: define void @PSMain()
-// CHECK: call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %"$Globals_buffer", i32 0)
+// CHECK: call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %"$Globals_cbuffer", i32 0)
 // CHECK: %{{[a-z0-9]+.*[a-z0-9]*}} = fadd fast float %{{[a-z0-9]+.*[a-z0-9]*}}, 5.000000e+00
 // CHECK: %{{[a-z0-9]+.*[a-z0-9]*}} = fmul fast float %{{[a-z0-9]+.*[a-z0-9]*}}, 3.000000e+00
 // CHECK: ret void

+ 2 - 2
tools/clang/unittests/HLSL/DxilContainerTest.cpp

@@ -1125,7 +1125,7 @@ TEST_F(DxilContainerTest, CompileWhenOkThenCheckReflection1) {
         D3D12_FUNCTION_DESC FnDesc;
         pFunctionReflection->GetDesc(&FnDesc);
         std::string Name = FnDesc.Name;
-        if (Name.compare("\01?function0@@YAM$f16@@Z") == 0) {
+        if (Name.compare("\01?function0@@YAM$min16f@@Z") == 0) {
           VERIFY_ARE_EQUAL(FnDesc.Version, EncodedVersion_lib_6_3);
           VERIFY_ARE_EQUAL(FnDesc.ConstantBuffers, 1);
           VERIFY_ARE_EQUAL(FnDesc.BoundResources, 2);
@@ -1156,7 +1156,7 @@ TEST_F(DxilContainerTest, CompileWhenOkThenCheckReflection1) {
               VERIFY_FAIL(L"Unexpected resource used");
             }
           }
-        } else if (Name.compare("\01?function1@@YAMMF@Z") == 0) {
+        } else if (Name.compare("\01?function1@@YAMM$min12i@@Z") == 0) {
           VERIFY_ARE_EQUAL(FnDesc.Version, EncodedVersion_lib_6_3);
           VERIFY_ARE_EQUAL(FnDesc.ConstantBuffers, 1);
           VERIFY_ARE_EQUAL(FnDesc.BoundResources, 4);