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

// This test confirms that `.Load()` on a `RWTexure*`
// gets properly converted to a call to `imageLoad`
// and not just `texelFetch` as it would for a `Texture*`.

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

struct Params
{
	RWTexture2DArray<float> tex;
}

ParameterBlock<Params> gParams;

void main(uint3 tid : SV_DispatchThreadID)
{
	float f = gParams.tex.Load(int3(tid.xy, tid.z));
}