yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Sriram MuraliDisallow multi-dim vector subscript in slang IR (#4277)0fe55d6d8

master
851 B18 linesraw
1//TEST:SIMPLE(filecheck=CHECK):-target cpp -entry computeMain -stage compute
2//TEST:SIMPLE(filecheck=CHECK):-target glsl -entry computeMain -stage compute
3//TEST:SIMPLE(filecheck=CHECK):-target hlsl -entry computeMain -stage compute
4//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-via-glsl -entry computeMain -stage compute
5//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-directly -entry computeMain -stage compute
6
7// This test tests that assigning to a subscript of a unary swizzle works
8
9RWStructuredBuffer<float> outputBuffer;
10
11[numthreads(1, 1, 1)]
12void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
13{
14    vector<vector<int, 2>, 2> v;
15    v.x[0] = 1;
16    // CHECK: ([[# @LINE+1]]): error 55200: 'vector<vector<{{.*}}>' is not a supported builtin type for the target.
17    outputBuffer[dispatchThreadID.x] = v.x[0];
18}