src/third_party/angle/src/tests/gl_tests/UniformBufferTest.cpp
// Test uniform block bindings greater than GL_MAX_UNIFORM_BUFFER_BINDINGS cause compile error.
Test uniform block bindings greater than GL_MAX_UNIFORM_BUFFER_BINDINGS cause compile error.
Test uniform block bindings greater than GL_MAX_UNIFORM_BUFFER_BINDINGS cause compile error .
TEST_P(UniformBufferTest31, MaxUniformBufferBindingsExceeded)
{
    GLint maxUniformBufferBindings;
    glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings);
    std::string source =
        "#version 310 es\n"
        "in vec4 position;\n"
        "layout(binding = ";
    std::stringstream ss;
    ss << maxUniformBufferBindings;
    source = source + ss.str() +
             ") uniform uni {\n"
             "    vec4 color;\n"
             "};\n"
             "void main()\n"
             "{\n"
             "    gl_Position = position;\n"
             "}";
    GLuint shader = CompileShader(GL_VERTEX_SHADER, source.c_str());
    EXPECT_EQ(0u, shader);
}
TEST_P ( UniformBufferTest31 , MaxUniformBufferBindingsExceeded ) { GLint maxUniformBufferBindings ; glGetIntegerv ( GL_MAX_UNIFORM_BUFFER_BINDINGS , & maxUniformBufferBindings ) ; std :: string source = " \n " " \n " " " ; std :: stringstream ss ; ss << maxUniformBufferBindings ; source = source + ss . str ( ) + " \n " " \n " " \n " " \n " " \n " " \n " " " ; GLuint shader = CompileShader ( GL_VERTEX_SHADER , source . c_str ( ) ) ; EXPECT_EQ ( 0u , shader ) ; }
Test uniform block bindings greater than GL_MAX_UNIFORM_BUFFER_BINDINGS cause compile error.
Test uniform block bindings greater than GL_MAX_UNIFORM_BUFFER_BINDINGS cause compile error .