src/third_party/angle/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp
// Tests that even if the app clears depth, it should be invalidated if there is no read.
Tests that even if the app clears depth, it should be invalidated if there is no read.
Tests that even if the app clears depth it should be invalidated if there is no read .
TEST_P(VulkanPerformanceCounterTest, SwapShouldInvalidateDepthAfterClear)
{
    const rx::vk::PerfCounters &counters = hackANGLE();
    ANGLE_GL_PROGRAM(redProgram, essl1_shaders::vs::Simple(), essl1_shaders::fs::Red());
    glClear(GL_DEPTH_BUFFER_BIT);
    glDisable(GL_DEPTH_TEST);
    drawQuad(redProgram, essl1_shaders::PositionAttrib(), 0.5f);
    ASSERT_GL_NO_ERROR();
    uint32_t expectedDepthClears = counters.depthClears;
    swapBuffers();
    uint32_t actualDepthClears = counters.depthClears;
    EXPECT_EQ(expectedDepthClears, actualDepthClears);
}
TEST_P ( VulkanPerformanceCounterTest , SwapShouldInvalidateDepthAfterClear ) { const rx :: vk :: PerfCounters & counters = hackANGLE ( ) ; ANGLE_GL_PROGRAM ( redProgram , essl1_shaders :: vs :: Simple ( ) , essl1_shaders :: fs :: Red ( ) ) ; glClear ( GL_DEPTH_BUFFER_BIT ) ; glDisable ( GL_DEPTH_TEST ) ; drawQuad ( redProgram , essl1_shaders :: PositionAttrib ( ) , 0.5f ) ; ASSERT_GL_NO_ERROR ( ) ; uint32_t expectedDepthClears = counters . depthClears ; swapBuffers ( ) ; uint32_t actualDepthClears = counters . depthClears ; EXPECT_EQ ( expectedDepthClears , actualDepthClears ) ; }
Tests that even if the app clears depth, it should be invalidated if there is no read.
Tests that even if the app clears depth it should be invalidated if there is no read .
// Clear depth. // Ensure we never read from depth. // Do one draw, then swap.