Skip to content

Commit

Permalink
added test case for repro
Browse files Browse the repository at this point in the history
  • Loading branch information
sriramm-nv committed Jun 6, 2024
1 parent e757ce7 commit d5ab695
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/bugs/unary-swizzle-subscript.slang
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -shaderobj
// CHECK: 1
// This test tests that assigning to a subscript of a unary swizzle works

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

[numthreads(1, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
vector<vector<int, 2>, 2> v;
v.x[0] = 1;
outputBuffer[dispatchThreadID.x] = v.x[0];
}

0 comments on commit d5ab695

Please sign in to comment.