chromium/third_party/angle/src/tests/gl_tests/DepthStencilFormatsTest.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"

#include "common/mathutil.h"
#include "platform/autogen/FeaturesD3D_autogen.h"

usingnamespaceangle;

struct ReadbackTestParam
{};

class DepthStencilFormatsTestBase : public ANGLETest<>
{};

class DepthStencilFormatsTest : public DepthStencilFormatsTestBase
{};

class DepthStencilFormatsTestES3 : public DepthStencilFormatsTestBase
{};

TEST_P(DepthStencilFormatsTest, DepthTexture)
{}

TEST_P(DepthStencilFormatsTest, PackedDepthStencil)
{}

void DepthStencilFormatsTestBase::depthStencilReadbackCase(const ReadbackTestParam &type)
{}

// This test will initialize a depth texture, clear it and read it back, if possible
TEST_P(DepthStencilFormatsTest, DepthStencilReadback_UShort)
{}

// This test will initialize a depth texture, clear it and read it back, if possible
TEST_P(DepthStencilFormatsTest, DepthStencilReadback_UInt)
{}

// This test will initialize a depth texture, clear it and read it back, if possible
TEST_P(DepthStencilFormatsTest, DepthStencilReadback_Float)
{}

// This test will initialize a depth texture, clear it and read it back, if possible
TEST_P(DepthStencilFormatsTest, DepthStencilReadback_DepthStencil)
{}

// Verify that packed D/S readPixels with a D32_FLOAT_S8X24_UINT attachment
TEST_P(DepthStencilFormatsTestES3, DepthStencilReadback_DepthFloatStencil)
{}

// This test will initialize a depth texture and then render with it and verify
// pixel correctness.
// This is modeled after webgl-depth-texture.html
TEST_P(DepthStencilFormatsTest, DepthTextureRender)
{}

// This test will initialize a frame buffer, attaching a color and 16-bit depth buffer,
// render to it with depth testing, and verify pixel correctness.
TEST_P(DepthStencilFormatsTest, DepthBuffer16)
{}

// This test will initialize a frame buffer, attaching a color and 24-bit depth buffer,
// render to it with depth testing, and verify pixel correctness.
TEST_P(DepthStencilFormatsTest, DepthBuffer24)
{}

TEST_P(DepthStencilFormatsTestES3, DrawWithDepth16)
{}

// This test reproduces a driver bug on Intel windows platforms on driver version
// from 4815 to 4901.
// When rendering with Stencil buffer enabled and depth buffer disabled, large
// viewport will lead to memory leak and driver crash. And the pixel result
// is a random value.
TEST_P(DepthStencilFormatsTestES3, DrawWithLargeViewport)
{}

// Verify that stencil component of depth texture is uploaded
TEST_P(DepthStencilFormatsTest, VerifyDepthStencilUploadData)
{}

// Verify that depth texture's data can be uploaded correctly
TEST_P(DepthStencilFormatsTest, VerifyDepth32UploadData)
{}

// Verify that 16 bits depth texture's data can be uploaded correctly
TEST_P(DepthStencilFormatsTest, VerifyDepth16UploadData)
{}

class DepthStencilFormatsTestES31 : public DepthStencilFormatsTestBase
{};

// Test depth24 texture sample from fragment shader and then read access from compute
TEST_P(DepthStencilFormatsTestES31, DrawReadDrawDispatch)
{}

ANGLE_INSTANTIATE_TEST_ES2();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES3();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES31();

class TinyDepthStencilWorkaroundTest : public ANGLETest<>
{};

// Tests that the tiny depth stencil textures workaround does not "stick" depth textures.
// http://anglebug.com/40644610
TEST_P(TinyDepthStencilWorkaroundTest, DepthTexturesStick)
{}

// Initialize a depth texture by writing to it in a fragment shader then attempt to read it from a
// compute shader. Regression test for D3D11 not unbinding the depth texture and the sampler binding
// failing.
TEST_P(DepthStencilFormatsTestES31, ReadDepthStencilInComputeShader)
{}

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES3_AND();