src/third_party/angle/src/tests/gl_tests/DrawBuffersTest.cpp
// Test draw buffer state change followed FBO blit
Test draw buffer state change followed FBO blit
Test draw buffer state change followed FBO blit
TEST_P(ColorMaskForDrawBuffersTest, Blit)
{
    ANGLE_SKIP_TEST_IF(!setupTest());
    setupColorMaskForDrawBuffersTest();
    glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mTextures[2],
                           0);
    drawBuffers[0] = GL_COLOR_ATTACHMENT0;
    setDrawBuffers(4, drawBuffers);
    glBlitFramebuffer(0, 0, getWindowWidth(), getWindowHeight(), 0, 0, getWindowWidth(),
                      getWindowHeight(), GL_COLOR_BUFFER_BIT, GL_NEAREST);
    verifyAttachment2DColor(0, mTextures[0], GL_TEXTURE_2D, 0, GLColor::yellow);
    verifyAttachment2DColor(1, mTextures[1], GL_TEXTURE_2D, 0, GLColor::green);
    EXPECT_GL_NO_ERROR();
}
TEST_P ( ColorMaskForDrawBuffersTest , Blit ) { ANGLE_SKIP_TEST_IF ( ! setupTest ( ) ) ; setupColorMaskForDrawBuffersTest ( ) ; glFramebufferTexture2D ( GL_READ_FRAMEBUFFER , GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D , mTextures [ 2 ] , 0 ) ; drawBuffers [ 0 ] = GL_COLOR_ATTACHMENT0 ; setDrawBuffers ( 4 , drawBuffers ) ; glBlitFramebuffer ( 0 , 0 , getWindowWidth ( ) , getWindowHeight ( ) , 0 , 0 , getWindowWidth ( ) , getWindowHeight ( ) , GL_COLOR_BUFFER_BIT , GL_NEAREST ) ; verifyAttachment2DColor ( 0 , mTextures [ 0 ] , GL_TEXTURE_2D , 0 , GLColor :: yellow ) ; verifyAttachment2DColor ( 1 , mTextures [ 1 ] , GL_TEXTURE_2D , 0 , GLColor :: green ) ; EXPECT_GL_NO_ERROR ( ) ; }
Test draw buffer state change followed FBO blit
Test draw buffer state change followed FBO blit
// BLIT mTexture[2] to attachment0. Buffer0 should remain red and buffer1 should be yellow