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

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

// Test that invokes a usecase where there is a feedback loop but the framebuffer
// depth attachment is only read from

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

usingnamespaceangle;

class ReadOnlyFeedbackLoopTest : public ANGLETest<>
{};

class ReadOnlyFeedbackLoopTestES31 : public ReadOnlyFeedbackLoopTest
{};

// Fill out a depth texture to specific values and use it both as a sampler and a depth texture
// with depth write disabled. This is to test a "read-only feedback loop" that needs to be
// supported to match industry standard.
TEST_P(ReadOnlyFeedbackLoopTest, DepthFeedbackLoop)
{}

// Tests that we can support a feedback loop between a depth textures and the depth buffer.
// The test emulates the read-only feedback loop in Manhattan.
TEST_P(ReadOnlyFeedbackLoopTest, ReadOnlyDepthFeedbackLoopSupported)
{}

// Tests corner cases with read-only depth-stencil feedback loops.
TEST_P(ReadOnlyFeedbackLoopTest, ReadOnlyDepthFeedbackLoopStateChanges)
{}

// Tests depth/stencil clear after read-only depth/stencil feedback loop draw.
TEST_P(ReadOnlyFeedbackLoopTest, ReadOnlyDepthFeedbackLoopDrawThenDepthStencilClear)
{}

// Tests scissored depth/stencil clear after read-only depth/stencil feedback loop draw.
TEST_P(ReadOnlyFeedbackLoopTest, ReadOnlyDepthFeedbackLoopDrawThenScissoredDepthStencilClear)
{}

// Tests depth/stencil blit after read-only depth/stencil feedback loop draw.
TEST_P(ReadOnlyFeedbackLoopTest, ReadOnlyDepthFeedbackLoopDrawThenDepthStencilBlit)
{}

// Tests that if the framebuffer is cleared, a feedback loop between a depth textures and the depth
// buffer is established, and a scissored clear is issued, that the clear is not mistakenly
// scissored.
TEST_P(ReadOnlyFeedbackLoopTest, ReadOnlyDepthFeedbackLoopWithClearAndScissoredDraw)
{}

// Tests that sampling from stencil while simultaneously bound as read-only attachment works.  Depth
// is being written at the same time.
TEST_P(ReadOnlyFeedbackLoopTestES31, SampleStencilWhileReadOnlyAttachment)
{}

// Tests that sampling from depth while simultaneously bound as read-only attachment works.  Stencil
// is being written at the same time.
TEST_P(ReadOnlyFeedbackLoopTestES31, SampleDepthWhileReadOnlyAttachment)
{}

// Tests that sampling from depth and stencil while simultaneously bound as read-only attachment
// works.
TEST_P(ReadOnlyFeedbackLoopTestES31, SampleDepthAndStencilWhileReadOnlyAttachment)
{}

// Instantiate the test for ES3.
ANGLE_INSTANTIATE_TEST_ES3();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES31();