// // Copyright 2016 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. // // CHROMIUMFramebufferMixedSamplesTest // Test CHROMIUM subset of NV_framebuffer_mixed_samples. // This extension allows rendering to a framebuffer that has different // sample counts for different render buffers (stencil, depth, color) #include "test_utils/ANGLETest.h" usingnamespaceangle; namespace { const GLuint kWidth = …; const GLuint kHeight = …; class CHROMIUMFramebufferMixedSamplesTest : public ANGLETest<> { … }; } // namespace TEST_P(CHROMIUMFramebufferMixedSamplesTest, StateSettingTest) { … } // The test pattern is as follows: // A green triangle (bottom left, top right, top left). // A blue triangle (top left, bottom right, bottom left). // The triangles will overlap but overlap only contains green pixels, // due to each draw erasing its area from stencil. // The blue triangle will fill only the area (bottom left, center, // bottom right). // The test tests that CoverageModulation call works. // The fractional pixels of both triangles end up being modulated // by the coverage of the fragment. Test that drawing with and without // CoverageModulation causes the result to be different. TEST_P(CHROMIUMFramebufferMixedSamplesTest, CoverageModulation) { … } // The test tests that the stencil buffer can be multisampled, even though the // color buffer is single-sampled. Draws the same pattern with single-sample // stencil buffer and with multisample stencil buffer. The images should differ. TEST_P(CHROMIUMFramebufferMixedSamplesTest, MultisampleStencilEffective) { … } ANGLE_INSTANTIATE_TEST_ES2(…);