third_party/skia_m76/third_party/externals/angle2/src/tests/gl_tests/BlitFramebufferANGLETest.cpp
// Make sure that attempts to flip in a blit call issue an error
Make sure that attempts to flip in a blit call issue an error
Make sure that attempts to flip in a blit call issue an error
TEST_P(BlitFramebufferANGLETest, ErrorFlipping)
{
    ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_ANGLE_framebuffer_blit"));
    glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    drawQuad(mCheckerProgram, essl1_shaders::PositionAttrib(), 0.5f);
    EXPECT_GL_NO_ERROR();
    glBindFramebuffer(GL_DRAW_FRAMEBUFFER_ANGLE, mOriginalFBO);
    glBindFramebuffer(GL_READ_FRAMEBUFFER_ANGLE, mUserFBO);
    glBlitFramebufferANGLE(0, 0, getWindowWidth() / 2, getWindowHeight() / 2, getWindowWidth() / 2,
                           getWindowHeight() / 2, 0, 0, GL_COLOR_BUFFER_BIT, GL_NEAREST);
    EXPECT_GL_ERROR(GL_INVALID_OPERATION);
}
TEST_P ( BlitFramebufferANGLETest , ErrorFlipping ) { ANGLE_SKIP_TEST_IF ( ! IsGLExtensionEnabled ( " " ) ) ; glBindFramebuffer ( GL_FRAMEBUFFER , mUserFBO ) ; glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ) ; drawQuad ( mCheckerProgram , essl1_shaders :: PositionAttrib ( ) , 0.5f ) ; EXPECT_GL_NO_ERROR ( ) ; glBindFramebuffer ( GL_DRAW_FRAMEBUFFER_ANGLE , mOriginalFBO ) ; glBindFramebuffer ( GL_READ_FRAMEBUFFER_ANGLE , mUserFBO ) ; glBlitFramebufferANGLE ( 0 , 0 , getWindowWidth ( ) / 2 , getWindowHeight ( ) / 2 , getWindowWidth ( ) / 2 , getWindowHeight ( ) / 2 , 0 , 0 , GL_COLOR_BUFFER_BIT , GL_NEAREST ) ; EXPECT_GL_ERROR ( GL_INVALID_OPERATION ) ; }
Make sure that attempts to flip in a blit call issue an error
Make sure that attempts to flip in a blit call issue an error