summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/types/modifiers/unorm-modifier.slang
blob: 72a7dca3d6613dcc54116c75aedb3b8dd179bb78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// unorm-modifier.slang

//TEST:COMPARE_HLSL:-profile cs_5_0 -entry main

// Check that this compiler for glsl (without using the modifiers)
//TEST:SIMPLE(filecheck=CHECK):-target glsl -entry main -stage compute
// CHECK: uniform textureBuffer input_0;
// CHECK: texelFetch((input_0)

#ifndef __SLANG__
#define input input_0
#define output output_0
#endif


Buffer<unorm float4> input;
RWStructuredBuffer<float4> output;

[numthreads(4, 1, 1)]
void main(uint3 dispatchThreadID : SV_DispatchThreadID)
{
    uint tid = dispatchThreadID.x;
    output[tid] = input[tid];
}