src/third_party/angle/src/tests/gl_tests/UniformBufferTest.cpp
// Test to transfer a uniform block large array member as an actual parameter to a function.
Test to transfer a uniform block large array member as an actual parameter to a function.
Test to transfer a uniform block large array member as an actual parameter to a function .
TEST_P(UniformBlockWithOneLargeArrayMemberTest, MemberAsActualParameter)
{
    constexpr char kVS[] = R"(#version 300 es
layout(location=0) in vec3 a_position;
uniform UBO{
    mat4x4 buf[90];
} instance;
vec4 test(mat4x4[90] para, vec3 pos){
    return para[0] * vec4(pos, 1.0);
}
void main(void){
    gl_Position = test(instance.buf, a_position);
})";
    constexpr char kFS[] = R"(#version 300 es
precision mediump float;
uniform vec3 u_color;
out vec4 oFragColor;
void main(void){
    oFragColor = vec4( u_color, 1.0);
})";
    ANGLE_GL_PROGRAM(program, kVS, kFS);
    EXPECT_GL_NO_ERROR();
}
TEST_P ( UniformBlockWithOneLargeArrayMemberTest , MemberAsActualParameter ) { constexpr char kVS [ ] = R" ( #version 300 es
layout(location=0) in vec3 a_position;

uniform UBO{
    mat4x4 buf[90];
} instance;

vec4 test(mat4x4[90] para, vec3 pos){
    return para[0] * vec4(pos, 1.0);
}

void main(void){
    gl_Position = test(instance.buf, a_position);
} ) " ; constexpr char kFS [ ] = R" ( #version 300 es
precision mediump float;

uniform vec3 u_color;
out vec4 oFragColor;

void main(void){
    oFragColor = vec4( u_color, 1.0);
} ) " ; ANGLE_GL_PROGRAM ( program , kVS , kFS ) ; EXPECT_GL_NO_ERROR ( ) ; }
Test to transfer a uniform block large array member as an actual parameter to a function.
Test to transfer a uniform block large array member as an actual parameter to a function .