yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
1d47ffa8
main
1#version 450 core 2#extension GL_NV_gpu_shader5 : require 3#extension GL_NV_cooperative_vector : require 4 5layout ( local_size_x = 8 , local_size_y = 8 ) in ; 6layout ( binding = 0 , rgba8 ) uniform image2D image ; 7 8layout ( std430 , binding = 1 ) buffer MatrixBuffer 9{ 10float matrix [] ; 11} ; 12 13shared float sharedArray [ 16 ] ; 14 15void main () 16{ 17// Test error: storing to local variable (should fail) 18float vecOut [ 4 ] ; 19coopvecNV < float , 4 > coopVecOut ; 20coopVecStoreNV ( coopVecOut , vecOut , 0 ) ; // ERROR: vecOut is local 21 22// Test error: loading from local variable (should fail) 23float vecIn [ 4 ] ; 24coopvecNV < float , 4 > coopVecIn ; 25coopVecLoadNV ( coopVecIn , vecIn , 0 ) ; // ERROR: vecIn is local 26 27// These should work correctly: 28// Store to buffer storage 29coopVecStoreNV ( coopVecOut , matrix , 0 ) ; 30 31// Load from buffer storage 32coopVecLoadNV ( coopVecIn , matrix , 0 ) ; 33 34// Store to shared storage 35coopVecStoreNV ( coopVecOut , sharedArray , 0 ) ; 36 37// Load from shared storage 38coopVecLoadNV ( coopVecIn , sharedArray , 0 ) ; 39} 40