src/third_party/angle/src/tests/gl_tests/UniformBufferTest.cpp
// Compile uniform buffer with large array member.
Compile uniform buffer with large array member.
Compile uniform buffer with large array member .
TEST_P(UniformBufferTest, LargeArrayOfStructs)
{
    constexpr char kVertexShader[] = R"(#version 300 es
        struct InstancingData
        {
            mat4 transformation;
        };
        #define MAX_INSTANCE_COUNT 800
        layout(std140) uniform InstanceBlock
        {
            InstancingData instances[MAX_INSTANCE_COUNT];
        };
        void main()
        {
            gl_Position = vec4(1.0) * instances[gl_InstanceID].transformation;
        })";
    constexpr char kFragmentShader[] = R"(#version 300 es
        precision mediump float;
        out vec4 outFragColor;
        void main()
        {
            outFragColor = vec4(0.0);
        })";
    ANGLE_GL_PROGRAM(program, kVertexShader, kFragmentShader);
    drawQuad(program.get(), essl3_shaders::PositionAttrib(), 0.5f);
}
TEST_P ( UniformBufferTest , LargeArrayOfStructs ) { constexpr char kVertexShader [ ] = R" ( #version 300 es
        struct InstancingData
        {
            mat4 transformation;
        };

        #define MAX_INSTANCE_COUNT 800

        layout(std140) uniform InstanceBlock
        {
            InstancingData instances[MAX_INSTANCE_COUNT];
        };

        void main()
        {
            gl_Position = vec4(1.0) * instances[gl_InstanceID].transformation;
        } ) " ; constexpr char kFragmentShader [ ] = R" ( #version 300 es
        precision mediump float;
        out vec4 outFragColor;
        void main()
        {
            outFragColor = vec4(0.0);
        } ) " ; ANGLE_GL_PROGRAM ( program , kVertexShader , kFragmentShader ) ; drawQuad ( program . get ( ) , essl3_shaders :: PositionAttrib ( ) , 0.5f ) ; }
Compile uniform buffer with large array member.
Compile uniform buffer with large array member .
// Add a draw call for the sake of the Vulkan backend that currently really builds shaders at // draw time.