summaryrefslogtreecommitdiff
path: root/tests/cross-compile/texture-load.slang
blob: 71f22b13acfb173b5d909387dda09391abd1694d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// texture-load.slang

// Confirm that texture `Load` operations yield the
// expected type when compiled to SPIR-V.

//TEST:CROSS_COMPILE:-target spirv-assembly -entry main -stage compute

Texture2D<float2>   inputTexture;
RWTexture2D<float2> outputTexture;

cbuffer C
{
	int2 pos;
}

[numthreads(16, 16, 1)]
void main(uint2 pixelIndex : SV_DispatchThreadID)
{
	float2 tmp = inputTexture.Load(int3(pos,0));
    outputTexture[pos] = tmp;
}