summaryrefslogtreecommitdiffstats
path: root/tests/bugs/g3180-swizzle-nd-vectors.slang
blob: a6d81740f9d92158ba035ebff457e291942f8bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//TEST:SIMPLE(filecheck=CHECK):-target cpp -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=CHECK):-target glsl -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=CHECK):-target hlsl -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-via-glsl -entry computeMain -stage compute
//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-directly -entry computeMain -stage compute

// This test tests that assigning to a subscript of a unary swizzle works

RWStructuredBuffer<float> outputBuffer;

[numthreads(1, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
    vector<vector<int, 2>, 2> v;
    v.x[0] = 1;
    // CHECK: ([[# @LINE+1]]): error 55200: 'vector<vector<{{.*}}>' is not a supported builtin type for the target.
    outputBuffer[dispatchThreadID.x] = v.x[0];
}