#version 450 core #extension GL_NV_gpu_shader5 : require #extension GL_NV_cooperative_vector : require layout(local_size_x = 8, local_size_y = 8) in; layout(binding = 0, rgba8) uniform image2D image; layout(std430, binding = 1) buffer MatrixBuffer { float matrix[]; }; shared float sharedArray[16]; void main() { // Test error: storing to local variable (should fail) float vecOut[4]; coopvecNV coopVecOut; coopVecStoreNV(coopVecOut, vecOut, 0); // ERROR: vecOut is local // Test error: loading from local variable (should fail) float vecIn[4]; coopvecNV coopVecIn; coopVecLoadNV(coopVecIn, vecIn, 0); // ERROR: vecIn is local // These should work correctly: // Store to buffer storage coopVecStoreNV(coopVecOut, matrix, 0); // Load from buffer storage coopVecLoadNV(coopVecIn, matrix, 0); // Store to shared storage coopVecStoreNV(coopVecOut, sharedArray, 0); // Load from shared storage coopVecLoadNV(coopVecIn, sharedArray, 0); }