// // Copyright 2022 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // FragDepthTest: // Tests the correctness of gl_FragDepth usage. // #include "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" usingnamespaceangle; class FragDepthTest : public ANGLETest<> { … }; // Test that writing to gl_FragDepth works TEST_P(FragDepthTest, DepthBufferBound) { … } // Test that writing to gl_FragDepth with no depth buffer works. TEST_P(FragDepthTest, DepthBufferUnbound) { … } // Test that fragment shader depth writes to a no-depth framebuffer do not fail // after using a depth-enabled framebuffer with the same program. TEST_P(FragDepthTest, SwitchToNoDepthFramebuffer) { … } class FragDepthRedeclarationTest : public ANGLETest<> { … }; // Test gl_FragDepth redeclared as vertex output TEST_P(FragDepthRedeclarationTest, VSOutput) { … } // Test gl_FragDepth redeclared as fragment input TEST_P(FragDepthRedeclarationTest, FSInput) { … } // Test gl_FragDepth redeclaration with no layout qualifier TEST_P(FragDepthRedeclarationTest, NoLayout) { … } // Test gl_FragDepth redeclaration with depth_any layout qualifier TEST_P(FragDepthRedeclarationTest, Any) { … } // Test gl_FragDepth redeclaration with depth_greater layout qualifier TEST_P(FragDepthRedeclarationTest, Greater) { … } // Test gl_FragDepth redeclaration with depth_less layout qualifier TEST_P(FragDepthRedeclarationTest, Less) { … } // Test gl_FragDepth redeclaration with depth_unchanged layout qualifier TEST_P(FragDepthRedeclarationTest, Unchanged) { … } GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST_ES3(…); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST_ES3(…);