https://github.com/shader-slang/slang
Raw File
Tip revision: 4f7d1f44a4b2a5eab2e2dec1edf3a156da78aae3 authored by Yong He on 11 February 2024, 09:05:37 UTC
Fix type checking around generic array types. (#3568)
Tip revision: 4f7d1f4
glsl-int-swizzle.slang
// glsl-int-swizzle.slang

//TEST(compute):COMPARE_COMPUTE:-vk -shaderobj

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

int getX(int4 v) { return v.x; }

[numthreads(4,1,1)]
void computeMain(uint3 tid : SV_DispatchThreadID)
{
    gBuffer[tid.x] = getX((1).xxxx);
}
back to top