Skip to content

Commit 004fe27

Browse files
authored
Metal compute tests (shader-slang#4292)
1 parent 72f10a8 commit 004fe27

File tree

161 files changed

+236
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+236
-61
lines changed

source/core/slang-render-api-util.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Slang {
1717
{ RenderApiType::Vulkan, "vk,vulkan", ""},
1818
{ RenderApiType::D3D12, "dx12,d3d12", ""},
1919
{ RenderApiType::D3D11, "dx11,d3d11", "hlsl,hlsl-rewrite,slang"},
20+
{ RenderApiType::Metal, "mtl,metal", ""},
2021
{ RenderApiType::CPU, "cpu", ""},
2122
{ RenderApiType::CUDA, "cuda", "cuda,ptx"},
2223
};
@@ -266,6 +267,9 @@ static bool _canLoadSharedLibrary(const char* libName)
266267
#if SLANG_WINDOWS_FAMILY
267268
case RenderApiType::OpenGl: return _canLoadSharedLibrary("opengl32");
268269
case RenderApiType::Vulkan: return _canLoadSharedLibrary("vulkan-1") || _canLoadSharedLibrary("vk_swiftshader");
270+
#elif SLANG_APPLE_FAMILY
271+
case RenderApiType::Vulkan: return true;
272+
case RenderApiType::Metal: return true;
269273
#elif SLANG_UNIX_FAMILY
270274
case RenderApiType::OpenGl: return true;
271275
case RenderApiType::Vulkan: return true;

source/core/slang-render-api-util.h

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ enum class RenderApiType
1515
Vulkan,
1616
D3D12,
1717
D3D11,
18+
Metal,
1819
CPU,
1920
CUDA,
2021
CountOf,
@@ -29,6 +30,7 @@ struct RenderApiFlag
2930
Vulkan = 1 << int(RenderApiType::Vulkan),
3031
D3D12 = 1 << int(RenderApiType::D3D12),
3132
D3D11 = 1 << int(RenderApiType::D3D11),
33+
Metal = 1 << int(RenderApiType::Metal),
3234
CPU = 1 << int(RenderApiType::CPU),
3335
CUDA = 1 << int(RenderApiType::CUDA),
3436
AllOf = (1 << int(RenderApiType::CountOf)) - 1 ///< All bits set

tests/autodiff-dstdlib/determinant.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
56
RWStructuredBuffer<float> outputBuffer;

tests/autodiff-dstdlib/dstdlib-mul-mat-mat.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
56
RWStructuredBuffer<float> outputBuffer;

tests/autodiff-dstdlib/dstdlib-mul-mat-vec.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
56
RWStructuredBuffer<float> outputBuffer;

tests/autodiff-dstdlib/dstdlib-mul-vec-mat.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
56
RWStructuredBuffer<float> outputBuffer;

tests/autodiff-dstdlib/dstdlib-sqrt.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
56
RWStructuredBuffer<float> outputBuffer;

tests/autodiff/custom-intrinsic.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer
56
RWStructuredBuffer<float> outputBuffer;
@@ -118,4 +119,4 @@ void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID)
118119
//outputBuffer[2] = g(dpa.p); // Expect: 1.381773
119120
//outputBuffer[3] = __fwd_diff(g)(dpa).d; // Expect: -0.301168
120121
}
121-
}
122+
}

tests/autodiff/global-param-hoisting.slang

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
88
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
99
//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -output-using-type -shaderobj
10+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
1011

1112
//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer
1213
RWStructuredBuffer<float> outputBuffer;

tests/autodiff/reverse-matrix-ops.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
22
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
56
RWStructuredBuffer<float> outputBuffer;

tests/bindings/nested-parameter-block-2.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -d3d12 -use-dxil -shaderobj -output-using-type
33
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type
4+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
45
// nested-parameter-block-2.slang
56

67
struct CB

tests/bugs/atomic-coerce.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
22
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0 ], stride=4):out,name outputBuffer
56
RWStructuredBuffer<int> outputBuffer;

tests/bugs/buffer-swizzle-store.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
22
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT: RWTexture2D(format=R16G16_FLOAT, size=4, content = one, mipMaps = 1):name g_test
56
[format("rg16f")]
@@ -13,4 +14,4 @@ void computeMain( uint2 dispatchThreadID : SV_DispatchThreadID )
1314
{
1415
g_test[dispatchThreadID].xy = float2(0.0, 1.0);
1516
outputBuffer[dispatchThreadID.x] = g_test[dispatchThreadID].y;
16-
}
17+
}

tests/bugs/dxbc-double-problem.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -output-using-type -shaderobj
44
//TEST(compute):COMPARE_COMPUTE_EX:-dx12 -compute -use-dxil -output-using-type -shaderobj
55
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-dx12 -compute -output-using-type -shaderobj
6+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
67

78
// The problem this test shows is around handling of double with dxbc on D3D12. In that combination
89
// this code does not write the correct value into the first element - it appears as 0, where
@@ -27,4 +28,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
2728
outputBuffer[1] = pi;
2829
outputBuffer[2] = pi_180;
2930
outputBuffer[3] = w;
30-
}
31+
}

tests/bugs/frexp-double.slang

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -output-using-type -render-feature double
55
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -emit-spirv-directly -output-using-type -render-feature double
66
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-cuda -output-using-type
7+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
78

89
// BUF: type: int32_t
910
// BUF-NEXT: 1

tests/bugs/frexp.slang

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -output-using-type
55
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -emit-spirv-directly -output-using-type
66
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-cuda -output-using-type
7+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
78

89
// BUF: type: int32_t
910
// BUF-NEXT: 1

tests/bugs/generic-default-matrix.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
45
RWStructuredBuffer<int> outputBuffer;

tests/bugs/generic-groupshared.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
22
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
56
RWStructuredBuffer<int> outputBuffer;
@@ -26,4 +27,4 @@ void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
2627
{
2728
S<2> s;
2829
outputBuffer[0] = s.doSomething();
29-
}
30+
}

tests/bugs/generic-member-method.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
44
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
5+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
56

67
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
78
RWStructuredBuffer<int> outputBuffer;
@@ -49,4 +50,4 @@ void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
4950
Impl impl;
5051
Nothing nothing;
5152
outputBuffer[0] = impl.doThing(2);
52-
}
53+
}

tests/bugs/generic-type-duplication.slang

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
44
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
5+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
56

67
struct MyGeneric<let addOne: bool>
78
{

tests/bugs/gh-2959.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF): -shaderobj -output-using-type
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
45
RWStructuredBuffer<uint> outputBuffer;

tests/bugs/gh-3980.slang

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute -shaderobj -output-using-type -emit-spirv-directly
55
//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-cpu -compute -output-using-type
66
//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-cuda -compute -output-using-type
7+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
78

89
// Slang removes parentheses characters for the bitwise operators when they are not needed.
910
// DXC prints warning messages even when the expression is correct.

tests/bugs/interface-type-self-ref.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
45
RWStructuredBuffer<int> outputBuffer;

tests/bugs/mutating/buffer-write-dce.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
// Confirm that calling a mutating method to write to a buffer location doesn't
45
// get DCE'd.
@@ -25,4 +26,4 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
2526
{
2627
int tid = dispatchThreadID.x;
2728
writeOutput(tid);
28-
}
29+
}

tests/bugs/mutating/mutating-call-in-loop-dce.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
// Confirm that a SideEffectFree mutable method does not get DCE'd when
45
// it is called from within a loop.
@@ -37,4 +38,4 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
3738
C c;
3839
c.init();
3940
outputBuffer[tid] = doSomething(c);
40-
}
41+
}

tests/bugs/mutating/mutating-generic-method.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
22
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
3+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
34

45
// Confirm that a generic method marked `[mutating]`
56
// produces an `inout` parameter for `this`.
@@ -47,4 +48,4 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
4748
int tid = dispatchThreadID.x;
4849
int val = test(tid);
4950
outputBuffer[tid] = val;
50-
}
51+
}

tests/bugs/mutating/resource-specialization-inout.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Bug related to resource specialization on unused resource typed fields.
22

33
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
4+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
45

56
//TEST_INPUT: Texture2D(size=4, content = one):name t2D
67
Texture2D t2D;
@@ -33,4 +34,4 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
3334
int inputVal = tid;
3435
int outputVal = test(inputVal);
3536
gOutputBuffer[tid] = outputVal;
36-
}
37+
}

tests/bugs/negative-literal.slang

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
33
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -shaderobj
44
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
5+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
56

67
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
78
RWStructuredBuffer<float> outputBuffer;

tests/bugs/nested-existential-dyndispatch.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
45
RWStructuredBuffer<float> outputBuffer;

tests/bugs/nested-switch.slang

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//TEST(compute):COMPARE_COMPUTE: -shaderobj
44
//TEST(compute):COMPARE_COMPUTE:-vk -shaderobj
55
//TEST(compute):COMPARE_COMPUTE:-cpu -shaderobj
6+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
67

78
int test(int t, int r)
89
{

tests/bugs/op-assignment-unify-mat.slang

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -vk
33
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
44
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -cpu
5+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
56

67
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
78
RWStructuredBuffer<uint> outputBuffer;

tests/bugs/operator-overload.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
// Tests operator overloading works in user space.
45

@@ -28,4 +29,4 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
2829
int r = int(c.x + c.y);
2930

3031
outputBuffer[dispatchThreadID.x] = int(r);
31-
}
32+
}

tests/bugs/specialize-existential-in-generic.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
[Specialize]
45
interface IAssoc
@@ -39,4 +40,4 @@ void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
3940
int tid = dispatchThreadID.x;
4041
GenType<Impl> val;
4142
gOutputBuffer[tid] = val.doThing();
42-
}
43+
}

tests/bugs/ssa-loop.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Bug related to SSA form for loops
44

55
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
6+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
67

78
int test(int val)
89
{
@@ -28,4 +29,4 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
2829
int inputVal = tid;
2930
int outputVal = test(inputVal);
3031
gOutputBuffer[tid] = outputVal;
31-
}
32+
}

tests/bugs/static-method.slang

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// static-method.slang
22

33
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
4+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
45

56
struct S
67
{

tests/bugs/texture2d-gather.hlsl

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(smoke):COMPARE_HLSL_RENDER:
2+
//DISABLE_TEST(smoke):COMPARE_HLSL_RENDER:-mtl
23
//TEST_INPUT: Texture2D(size=16, content=chessboard, format=R32_FLOAT):name g_texture
34
//TEST_INPUT: Sampler :name g_sampler
45

tests/bugs/type-legalize-bug-1.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE: -shaderobj
2+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
23

34
//TEST_INPUT:ubuffer(data=[9 9 9 9], stride=4):out,name outputBuffer
45
//TEST_INPUT:type_conformance A:IFoo=0
@@ -53,4 +54,4 @@ struct A : IFoo
5354
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
5455
{
5556
user();
56-
}
57+
}

tests/bugs/vec-compare.slang

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
22
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -shaderobj
33
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
4+
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
45

56
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer
67
RWStructuredBuffer<int> outputBuffer;
@@ -76,4 +77,4 @@ void computeMain(int2 pixelIndex : SV_DispatchThreadID)
7677
}
7778

7879
outputBuffer[pixelIndex.x + pixelIndex.y * 4] = (coerceBits << 24) | (floatBits << 16) | (intBits << 8) | (uintBits);
79-
}
80+
}

0 commit comments

Comments
 (0)