summaryrefslogtreecommitdiffstats
path: root/tests/metal/texture-multisample.slang
blob: 310c165c140c8bb0e206b4cf8794f803735dcc70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//TEST:SIMPLE(filecheck=METAL): -stage compute -entry computeMain -target metal -DEMIT_SOURCE
//DISABLE_TEST:SIMPLE(filecheck=METALLIB): -stage compute -entry computeMain -target metallib -DEMIT_SOURCE

// Disabled due to location argument being passed wrong argument type
// TODO: github issue #8457

// METALLIB-NOT: error :
// METALLIB: @computeMain

Texture2DMS<float4> texMS;
RWTexture2D<float4> output;

[numthreads(1, 1, 1)]
void computeMain()
{
    int2 location = int2(0, 0);
    uint sampleIndex = 0;
    // METAL: {{.*}}access::read{{.*}}
    float4 v = texMS.Load(location, sampleIndex);
    output[location] = v;
}