summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/int-texture-sample.slang
blob: a6e0eeb1607d719d2b90f8e7a37ba74eb1c2f3d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage compute -entry computeMain

Texture2D<int4> t2D;
SamplerState s;

//TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
RWStructuredBuffer<int4> outputBuffer;

void computeMain()
{
    // CHECK: error 41400: {{.*}} HLSL supports only float and half type textures
    outputBuffer[0] = t2D.Sample(s, float2(0.0, 0.0));
}