blob: 67f452cfccfcb65c9b88f6e01c60015b6762e1a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//TEST:SIMPLE(filecheck=CUDA): -target cuda -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=MTL): -target metallib -entry computeMain -profile cs_6_6
//TEST:SIMPLE(filecheck=HLSL): -target hlsl -entry computeMain -profile cs_6_6
//TEST:SIMPLE(filecheck=DXIL): -target dxil -entry computeMain -profile cs_6_6
//TEST:SIMPLE(filecheck=SPV): -target spirv
// SPV: OpImageSample
// HLSL: ResourceDescriptorHeap[{{.*}}]
// HLSL: SamplerDescriptorHeap[{{.*}}]
// HLSL: SampleLevel
// DXIL: computeMain
// CUDA: computeMain
// MTL: define void @computeMain
uniform StructuredBuffer<DescriptorHandle<Sampler2D>> t;
uniform DescriptorHandle<RWStructuredBuffer<float4>> buffer;
[numthreads(1,1,1)]
void computeMain()
{
buffer[0] = t[0]->SampleLevel(float2(0.0), 0.0);
}
|