chromium/third_party/angle/src/tests/gl_tests/DrawBuffersTest.cpp

//
// Copyright 2015 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.
//

#include "test_utils/ANGLETest.h"
#include "test_utils/gl_raii.h"

usingnamespaceangle;

class DrawBuffersTest : public ANGLETest<>
{};

class DrawBuffersWebGL2Test : public DrawBuffersTest
{};

// Verify that GL_MAX_DRAW_BUFFERS returns the expected values for D3D11
TEST_P(DrawBuffersTest, VerifyD3DLimits)
{}

TEST_P(DrawBuffersTest, Gaps)
{}

// Test that blend works with gaps
TEST_P(DrawBuffersTest, BlendWithGaps)
{}

// Test that clear works with gaps
TEST_P(DrawBuffersTest, ClearWithGaps)
{}

// Test that mid-render pass clear works with gaps
TEST_P(DrawBuffersTest, MidRenderPassClearWithGaps)
{}

// Test that mid-render pass clear works with gaps.  Uses RGB format.
TEST_P(DrawBuffersTest, MidRenderPassClearWithGapsRGB)
{}

// Test that a masked draw and a mid-render pass clear works with gaps.
TEST_P(DrawBuffersTest, MaskedDrawMidRPClearWithGaps)
{}

// Test that a masked draw and a mid-render pass clear works with gaps.  Uses RGB format.
TEST_P(DrawBuffersTest, MaskedDrawMidRPClearWithGapsRGB)
{}

TEST_P(DrawBuffersTest, FirstAndLast)
{}

TEST_P(DrawBuffersTest, FirstHalfNULL)
{}

// Test that non-zero draw buffers can be queried on the default framebuffer
TEST_P(DrawBuffersTest, DefaultFramebufferDrawBufferQuery)
{}

// Test that drawing with all color buffers disabled works.
TEST_P(DrawBuffersTest, None)
{}

// Test that drawing with a color buffer disabled and a depth buffer enabled works.
TEST_P(DrawBuffersTest, NoneWithDepth)
{}

// Test that drawing with a color buffer disabled and a stencil buffer enabled works.
TEST_P(DrawBuffersTest, NoneWithStencil)
{}

// Test that draws to every buffer and verifies that every buffer was drawn to.
TEST_P(DrawBuffersTest, AllRGBA8)
{}
// Same as above but adds a state change from a program with different masks after a clear.
TEST_P(DrawBuffersWebGL2Test, TwoProgramsWithDifferentOutputsAndClear)
{}

// Test clear with gaps in draw buffers, originally show up as
// webgl_conformance_vulkan_passthrough_tests conformance/extensions/webgl-draw-buffers.html
// failure. This is added for ease of debugging.
TEST_P(DrawBuffersWebGL2Test, Clear)
{}

TEST_P(DrawBuffersTest, UnwrittenOutputVariablesShouldNotCrash)
{}

TEST_P(DrawBuffersTest, BroadcastGLFragColor)
{}

// Test that binding multiple layers of a 3D texture works correctly.
// This is the same as DrawBuffersTestES3.3DTextures but is used for GL_OES_texture_3D extension
// on GLES 2.0 instead.
TEST_P(DrawBuffersTest, 3DTexturesOES)
{}

class DrawBuffersTestES3 : public DrawBuffersTest
{};

// Test that binding multiple layers of a 3D texture works correctly
TEST_P(DrawBuffersTestES3, 3DTextures)
{}

// Test that binding multiple layers of a 2D array texture works correctly
TEST_P(DrawBuffersTestES3, 2DArrayTextures)
{}

// Test that binding multiple faces of a CubeMap texture works correctly
TEST_P(DrawBuffersTestES3, CubeMapTextures)
{}

// Test that binding multiple layers of a CubeMap array texture works correctly
TEST_P(DrawBuffersTestES3, CubeMapArrayTextures)
{}

// Test that blend works when draw buffers and framebuffers change.
TEST_P(DrawBuffersTestES3, BlendWithDrawBufferAndFramebufferChanges)
{}

// Test that a disabled color attachment incompatible with a fragment output
// is correctly ignored and does not affect other attachments.
TEST_P(DrawBuffersTestES3, DrawWithDisabledIncompatibleAttachment)
{}

// Vulkan backend is setting per buffer color mask to false for draw buffers that set to GL_NONE.
// These set of tests are to test draw buffer change followed by draw/clear/blit and followed by
// draw buffer change are behaving correctly.
class ColorMaskForDrawBuffersTest : public DrawBuffersTest
{};

// Test draw buffer state change followed draw call
TEST_P(ColorMaskForDrawBuffersTest, DrawQuad)
{}

// Test draw buffer state change followed clear
TEST_P(ColorMaskForDrawBuffersTest, Clear)
{}

// Test draw buffer state change followed scissored clear
TEST_P(ColorMaskForDrawBuffersTest, ScissoredClear)
{}

// Test draw buffer state change followed FBO blit
TEST_P(ColorMaskForDrawBuffersTest, Blit)
{}

// Test that enabling/disabling FBO draw buffers affects color mask
TEST_P(ColorMaskForDrawBuffersTest, StateChangeAffectsColorMask)
{}

// Test that enabling/disabling FBO draw buffers affects blend state appropriately as well as the
// color mask.
TEST_P(ColorMaskForDrawBuffersTest, StateChangeAffectsBlendState)
{}

ANGLE_INSTANTIATE_TEST();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES3();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES3();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES3();