1617a3babSopenharmony_ci#version 450 2617a3babSopenharmony_ci 3617a3babSopenharmony_ci#extension GL_EXT_buffer_reference : enable 4617a3babSopenharmony_ci 5617a3babSopenharmony_cilayout(buffer_reference) buffer bufType1 { int x; }; 6617a3babSopenharmony_cilayout(buffer_reference) buffer bufType2 { int x; }; 7617a3babSopenharmony_cilayout(buffer_reference) uniform bufType3 { int x; }; 8617a3babSopenharmony_ci 9617a3babSopenharmony_cilayout(buffer_reference) buffer; 10617a3babSopenharmony_cilayout(buffer_reference) uniform; 11617a3babSopenharmony_cilayout(buffer_reference) in; 12617a3babSopenharmony_cilayout(buffer_reference) out; 13617a3babSopenharmony_cilayout(buffer_reference) in badin { float x; } badin2; 14617a3babSopenharmony_cilayout(buffer_reference) out badout { float x; } badout2; 15617a3babSopenharmony_ci 16617a3babSopenharmony_cilayout(buffer_reference) buffer bufType5; 17617a3babSopenharmony_ci 18617a3babSopenharmony_cilayout(buffer_reference) buffer bufType6 { int x[]; }; 19617a3babSopenharmony_ci 20617a3babSopenharmony_cibuffer bufType4 { 21617a3babSopenharmony_ci bufType1 b1; 22617a3babSopenharmony_ci bufType2 b2; 23617a3babSopenharmony_ci bufType3 b3; 24617a3babSopenharmony_ci bufType6 b6; 25617a3babSopenharmony_ci} b4; 26617a3babSopenharmony_ci 27617a3babSopenharmony_civoid f() 28617a3babSopenharmony_ci{ 29617a3babSopenharmony_ci bufType6 b; 30617a3babSopenharmony_ci b.x.length(); 31617a3babSopenharmony_ci b4.b6.x.length(); 32617a3babSopenharmony_ci b[2]; // ERROR, can't index due to unsized array 33617a3babSopenharmony_ci} 34617a3babSopenharmony_ci 35617a3babSopenharmony_civoid main() { 36617a3babSopenharmony_ci bufType2 x1 = b4.b1; 37617a3babSopenharmony_ci bufType2 x2 = bufType2(b4.b1); 38617a3babSopenharmony_ci bufType2 x3 = bufType2(b4.b2); 39617a3babSopenharmony_ci bufType2 x4 = bufType2(b4.b3); 40617a3babSopenharmony_ci 41617a3babSopenharmony_ci b4.b1 = b4.b2; 42617a3babSopenharmony_ci b4.b1 = b4.b3; 43617a3babSopenharmony_ci b4.b3 = b4.b2; 44617a3babSopenharmony_ci} 45617a3babSopenharmony_ci 46617a3babSopenharmony_cilayout(buffer_reference) uniform bufType5 { int x; }; 47