src/third_party/angle/src/tests/gl_tests/GetTexLevelParameterTest.cpp
// Test various queries exposed by GL_ANGLE_get_tex_level_parameter
Test various queries exposed by GL_ANGLE_get_tex_level_parameter
Test various queries exposed by GL_ANGLE_get_tex_level_parameter
TEST_P(GetTexLevelParameterTest, Queries)
{
    ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_ANGLE_get_tex_level_parameter"));
    GLTexture texture;
    glBindTexture(GL_TEXTURE_2D, texture);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
    {
        GLint width = 0;
        glGetTexLevelParameterivANGLE(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width);
        EXPECT_GL_NO_ERROR();
        EXPECT_EQ(1, width);
    }
    {
        GLint height = 0;
        glGetTexLevelParameterivANGLE(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height);
        EXPECT_GL_NO_ERROR();
        EXPECT_EQ(2, height);
    }
    {
        GLint internalFormat = 0;
        glGetTexLevelParameterivANGLE(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT,
                                      &internalFormat);
        EXPECT_GL_NO_ERROR();
        EXPECT_GLENUM_EQ(GL_RGBA, internalFormat);
    }
}
TEST_P ( GetTexLevelParameterTest , Queries ) { ANGLE_SKIP_TEST_IF ( ! EnsureGLExtensionEnabled ( " " ) ) ; GLTexture texture ; glBindTexture ( GL_TEXTURE_2D , texture ) ; glTexImage2D ( GL_TEXTURE_2D , 0 , GL_RGBA , 1 , 2 , 0 , GL_RGBA , GL_UNSIGNED_BYTE , nullptr ) ; { GLint width = 0 ; glGetTexLevelParameterivANGLE ( GL_TEXTURE_2D , 0 , GL_TEXTURE_WIDTH , & width ) ; EXPECT_GL_NO_ERROR ( ) ; EXPECT_EQ ( 1 , width ) ; } { GLint height = 0 ; glGetTexLevelParameterivANGLE ( GL_TEXTURE_2D , 0 , GL_TEXTURE_HEIGHT , & height ) ; EXPECT_GL_NO_ERROR ( ) ; EXPECT_EQ ( 2 , height ) ; } { GLint internalFormat = 0 ; glGetTexLevelParameterivANGLE ( GL_TEXTURE_2D , 0 , GL_TEXTURE_INTERNAL_FORMAT , & internalFormat ) ; EXPECT_GL_NO_ERROR ( ) ; EXPECT_GLENUM_EQ ( GL_RGBA , internalFormat ) ; } }
Test various queries exposed by GL_ANGLE_get_tex_level_parameter
Test various queries exposed by GL_ANGLE_get_tex_level_parameter