yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

James Helferty (NVIDIA)Enable metal tests (#8446)8086adc90

master
695 B19 linesraw
1//TEST:SIMPLE(filecheck=METALLIB): -target metallib
2//TEST(compute, metal):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-metal -compute -output-using-type
3//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute -output-using-type
4
5//TEST_INPUT: Texture2D(size=4, format=D32Float, content = one):name texture
6Texture2D texture;
7//TEST_INPUT: Sampler(depthCompare):name sampler
8SamplerComparisonState sampler;
9
10//TEST_INPUT: ubuffer(data=[0], stride=1):out,name output
11RWStructuredBuffer<float> output;
12
13[numthreads(1,1,1)]
14void computeMain()
15{
16    // METALLIB: sample_compare_depth_2d
17    // BUF: 1.000000
18    output[0] = texture.SampleCmpLevelZero(sampler, float2(0, 0), 0);
19}