src/third_party/angle/src/tests/gl_tests/TextureFilteringHintTest.cpp
// Test that setting the hint works only when the extension is enabled
Test that setting the hint works only when the extension is enabled
Test that setting the hint works only when the extension is enabled
TEST_P(TextureFilteringHintTest, Validation)
{
    if (IsGLExtensionEnabled("GL_CHROMIUM_texture_filtering_hint"))
    {
        GLint intValue = 0;
        glGetIntegerv(GL_TEXTURE_FILTERING_HINT_CHROMIUM, &intValue);
        EXPECT_GL_NO_ERROR();
        EXPECT_GLENUM_EQ(GL_DONT_CARE, intValue);
        glHint(GL_TEXTURE_FILTERING_HINT_CHROMIUM, GL_FASTEST);
        glGetIntegerv(GL_TEXTURE_FILTERING_HINT_CHROMIUM, &intValue);
        EXPECT_GL_NO_ERROR();
        EXPECT_GLENUM_EQ(GL_FASTEST, intValue);
        glHint(GL_TEXTURE_FILTERING_HINT_CHROMIUM, GL_NICEST);
        glGetIntegerv(GL_TEXTURE_FILTERING_HINT_CHROMIUM, &intValue);
        EXPECT_GL_NO_ERROR();
        EXPECT_GLENUM_EQ(GL_NICEST, intValue);
        glHint(GL_TEXTURE_FILTERING_HINT_CHROMIUM, GL_TEXTURE_2D);
        glGetIntegerv(GL_TEXTURE_FILTERING_HINT_CHROMIUM, &intValue);
        EXPECT_GL_ERROR(GL_INVALID_ENUM);
    }
    else
    {
        glHint(GL_TEXTURE_FILTERING_HINT_CHROMIUM, GL_FASTEST);
        EXPECT_GL_ERROR(GL_INVALID_ENUM);
    }
}
TEST_P ( TextureFilteringHintTest , Validation ) { if ( IsGLExtensionEnabled ( " " ) ) { GLint intValue = 0 ; glGetIntegerv ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , & intValue ) ; EXPECT_GL_NO_ERROR ( ) ; EXPECT_GLENUM_EQ ( GL_DONT_CARE , intValue ) ; glHint ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , GL_FASTEST ) ; glGetIntegerv ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , & intValue ) ; EXPECT_GL_NO_ERROR ( ) ; EXPECT_GLENUM_EQ ( GL_FASTEST , intValue ) ; glHint ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , GL_NICEST ) ; glGetIntegerv ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , & intValue ) ; EXPECT_GL_NO_ERROR ( ) ; EXPECT_GLENUM_EQ ( GL_NICEST , intValue ) ; glHint ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , GL_TEXTURE_2D ) ; glGetIntegerv ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , & intValue ) ; EXPECT_GL_ERROR ( GL_INVALID_ENUM ) ; } else { glHint ( GL_TEXTURE_FILTERING_HINT_CHROMIUM , GL_FASTEST ) ; EXPECT_GL_ERROR ( GL_INVALID_ENUM ) ; } }
Test that setting the hint works only when the extension is enabled
Test that setting the hint works only when the extension is enabled