yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
64dfdbda7
master
1// binding-attribute-ignored.slang 2// Test that binding attributes on uniforms that get packed into the default uniform buffer trigger a warning 3 4//TEST:SIMPLE(filecheck=CHECK):-target spirv 5 6//CHECK: ([[# @LINE+2]]): warning 39071 7[[vk::binding(1, 2)]] 8uniform float4 g_position; 9 10//CHECK: ([[# @LINE+2]]): warning 39071 11[[vk::binding(3, 1)]] 12uniform float4x4 g_transform; 13 14// This won't trigger a warning because it's a texture (not packed into default uniform buffer) 15[[vk::binding(0, 0)]] 16Texture2D g_texture; 17 18[shader("vertex")] 19float4 main(float4 pos : POSITION) : SV_POSITION 20{ 21 return g_position; 22}