chromium/third_party/angle/src/tests/gl_tests/FramebufferTest.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.
//
// Framebuffer tests:
//   Various tests related for Frambuffers.
//

#include "common/mathutil.h"
#include "platform/autogen/FeaturesD3D_autogen.h"
#include "test_utils/ANGLETest.h"
#include "test_utils/gl_raii.h"
#include "util/OSWindow.h"

usingnamespaceangle;

namespace
{

void ExpectFramebufferCompleteOrUnsupported(GLenum binding)
{}

}  // anonymous namespace

class FramebufferFormatsTest : public ANGLETest<>
{};

TEST_P(FramebufferFormatsTest, RGBA4)
{}

TEST_P(FramebufferFormatsTest, RGB565)
{}

TEST_P(FramebufferFormatsTest, RGB8)
{}

TEST_P(FramebufferFormatsTest, BGRA8)
{}

TEST_P(FramebufferFormatsTest, RGBA8)
{}

TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH16)
{}

TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH24)
{}

TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH32F)
{}

TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH24_STENCIL8)
{}

TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH32F_STENCIL8)
{}

TEST_P(FramebufferFormatsTest, RenderbufferMultisample_STENCIL_INDEX8)
{}

// Test that binding an incomplete cube map is rejected by ANGLE.
TEST_P(FramebufferFormatsTest, IncompleteCubeMap)
{}

// Test that a renderbuffer with zero height but nonzero width is handled without crashes/asserts.
TEST_P(FramebufferFormatsTest, ZeroHeightRenderbuffer)
{}

// Test to cover a bug where the read framebuffer affects the completeness of the draw framebuffer.
TEST_P(FramebufferFormatsTest, ReadDrawCompleteness)
{}

// Test that a renderbuffer with RGB565 format works as expected. This test is intended for some
// back-end having no support for native RGB565 renderbuffer and thus having to emulate using RGBA
// format.
TEST_P(FramebufferFormatsTest, RGB565Renderbuffer)
{}

class FramebufferTest_ES3 : public ANGLETest<>
{};

// Covers invalidating an incomplete framebuffer. This should be a no-op, but should not error.
TEST_P(FramebufferTest_ES3, InvalidateIncomplete)
{}

// Covers sub-invalidating an incomplete framebuffer. This should be a no-op, but should not error.
TEST_P(FramebufferTest_ES3, SubInvalidateIncomplete)
{}

enum class DisableDitherVsClear
{};

void testDitherDisabledProperlyOnRGB565(GLColor gradientColor,
                                        DisableDitherVsClear disableDitherVsClear)
{}

// repro dEQP-GLES3.functional.dither.disabled.gradient_red failure
TEST_P(FramebufferTest_ES3, RGB565DisableDitheringGradientRedTest)
{}

// repro dEQP-GLES3.functional.dither.disabled.gradient_green failure
TEST_P(FramebufferTest_ES3, RGB565DisableDitheringGradientGreenTest)
{}

// repro dEQP-GLES3.functional.dither.disabled.gradient_blue failure
TEST_P(FramebufferTest_ES3, RGB565DisableDitheringGradientBlueTest)
{}

// repro dEQP-GLES3.functional.dither.disabled.gradient_white failure
TEST_P(FramebufferTest_ES3, RGB565DisableDitheringGradientWhiteTest)
{}

// Test that subinvalidate with no prior command works.  Regression test for the Vulkan backend that
// assumed a render pass is started when sub invalidate is called.
TEST_P(FramebufferTest_ES3, SubInvalidateFirst)
{}

// Test that subinvalidate doesn't discard data outside area.  Uses swapped width/height for
// invalidate which results in a partial invalidate, but also prevents bugs with Vulkan
// pre-rotation.
TEST_P(FramebufferTest_ES3, SubInvalidatePartial)
{}

// Test that invalidating depth/stencil of the default framebuffer doesn't crash.
TEST_P(FramebufferTest_ES3, InvalidateDefaultFramebufferDepthStencil)
{}

// Test that invalidating color of the default framebuffer doesn't crash.
TEST_P(FramebufferTest_ES3, InvalidateDefaultFramebufferColor)
{}

// Test that invalidating all attachments on the default framebuffer doesn't crash.
TEST_P(FramebufferTest_ES3, InvalidateDefaultFramebuffer)
{}

// Test that invalidating combined depth/stencil attachment doesn't crash.
TEST_P(FramebufferTest_ES3, InvalidateDepthStencil)
{}

// Test that invalidating an FB with a stencil attachment, which
// generates Validation errors, will not fail
TEST_P(FramebufferTest_ES3, InvalidateStencilAttachmentOnly)
{}

// Test that invalidating stencil-only attachment doesn't crash.
TEST_P(FramebufferTest_ES3, InvalidateStencilOnly)
{}

// Test that invalidating stencil of a depth-only attachment doesn't crash.
TEST_P(FramebufferTest_ES3, DepthOnlyAttachmentInvalidateStencil)
{}

// Test that invalidating depth of a stencil-only attachment doesn't crash.
TEST_P(FramebufferTest_ES3, StencilOnlyAttachmentInvalidateDepth)
{}

// Test that a scissored draw followed by subinvalidate followed by a non-scissored draw retains the
// part that is not invalidated.  Uses swapped width/height for invalidate which results in a
// partial invalidate, but also prevents bugs with Vulkan pre-rotation.
TEST_P(FramebufferTest_ES3, ScissoredDrawSubInvalidateThenNonScissoredDraw)
{}

// Test that the framebuffer state tracking robustly handles a depth-only attachment being set
// as a depth-stencil attachment. It is equivalent to detaching the depth-stencil attachment.
TEST_P(FramebufferTest_ES3, DepthOnlyAsDepthStencil)
{}

// Test that the framebuffer correctly returns that it is not complete if invalid texture mip levels
// are bound
TEST_P(FramebufferTest_ES3, TextureAttachmentMipLevels)
{}

TEST_P(FramebufferTest_ES3, TextureAttachmentMipLevelsReadBack)
{}

// TextureAttachmentMipLevelsReadBackWithDraw is a copy of TextureAttachmentMipLevelsReadBack except
// for adding a draw after the last clear. The draw forces ANGLE's Vulkan backend to use the
// framebuffer that is level 1 of the texture which will trigger the mismatch use of the GL level
// and Vulkan level in referring to that rendertarget.
TEST_P(FramebufferTest_ES3, TextureAttachmentMipLevelsReadBackWithDraw)
{}

// Test that passing an attachment COLOR_ATTACHMENTm where m is equal to MAX_COLOR_ATTACHMENTS
// generates an INVALID_OPERATION.
// OpenGL ES Version 3.0.5 (November 3, 2016), 4.4.2.4 Attaching Texture Images to a Framebuffer, p.
// 208
TEST_P(FramebufferTest_ES3, ColorAttachmentIndexOutOfBounds)
{}

// Check that depth-only attachments report the correct number of samples.
TEST_P(FramebufferTest_ES3, MultisampleDepthOnly)
{}

// Check that we only compare width and height of attachments, not depth.
TEST_P(FramebufferTest_ES3, AttachmentWith3DLayers)
{}

// Check that invalid layer is detected in framebuffer completeness check.
TEST_P(FramebufferTest_ES3, 3DAttachmentInvalidLayer)
{}

// Check that invalid layer is detected in framebuffer completeness check.
TEST_P(FramebufferTest_ES3, 2DArrayInvalidLayer)
{}

// Test that clearing the stencil buffer when the framebuffer only has a color attachment does not
// crash.
TEST_P(FramebufferTest_ES3, ClearNonexistentStencil)
{}

// Test that clearing the depth buffer when the framebuffer only has a color attachment does not
// crash.
TEST_P(FramebufferTest_ES3, ClearNonexistentDepth)
{}

// Test that clearing a nonexistent color attachment does not crash.
TEST_P(FramebufferTest_ES3, ClearNonexistentColor)
{}

// Test that clearing the depth and stencil buffers when the framebuffer only has a color attachment
// does not crash.
TEST_P(FramebufferTest_ES3, ClearNonexistentDepthStencil)
{}

// Test that clearing a color attachment that has been deleted doesn't crash.
TEST_P(FramebufferTest_ES3, ClearDeletedAttachment)
{}

// Test that resizing the color attachment is handled correctly.
TEST_P(FramebufferTest_ES3, ResizeColorAttachmentSmallToLarge)
{}

// Test that resizing the color attachment is handled correctly.
TEST_P(FramebufferTest_ES3, ResizeColorAttachmentLargeToSmall)
{}

// Test that resizing the texture is handled correctly.
TEST_P(FramebufferTest_ES3, ResizeTextureLargeToSmall)
{}

// Test that resizing the texture is handled correctly.
TEST_P(FramebufferTest_ES3, ResizeTextureSmallToLarge)
{}

// Test that fewer outputs than framebuffer attachments doesn't crash.  This causes a Vulkan
// validation warning, but should not be fatal.
TEST_P(FramebufferTest_ES3, FewerShaderOutputsThanAttachments)
{}

// Test that GL_RGB9_E5 is renderable with the extension.
TEST_P(FramebufferTest_ES3, RenderSharedExponent)
{}

// Test color write masks with GL_RGB9_E5 color buffers.
TEST_P(FramebufferTest_ES3, RenderSharedExponentWithMask)
{}

// Test that R8_SNORM, RG8_SNORM, and RGBA8_SNORM are renderable with the extension.
TEST_P(FramebufferTest_ES3, RenderSnorm8)
{}

// Test that non-trivial, e.g., reversed, blits are supported for signed normalized formats.
TEST_P(FramebufferTest_ES3, BlitReversedSnorm8)
{}

// Test that R16_SNORM, RG16_SNORM, and RGBA16_SNORM are renderable with the extension.
TEST_P(FramebufferTest_ES3, RenderSnorm16)
{}

class FramebufferTest_ES3Metal : public FramebufferTest_ES3
{};

// Metal, iOS has a limit of the number of bits that can be output
// to color attachments. Test we're enforcing that limit.
TEST_P(FramebufferTest_ES3Metal, TooManyBitsGeneratesFramebufferUnsupported)
{}

// Metal, iOS has a limit of the number of bits that can be output
// to color attachments. Test we're enforcing that limit.
// This test is separate from the one above as it's possible
// glCheckFramebufferStatus might cache some calculation so we
// don't call here to ensure we get INVALID_FRAMEBUFFER_OPERATION
// when drawing.
TEST_P(FramebufferTest_ES3Metal, TooManyBitsGeneratesInvalidFramebufferOperation)
{}

class FramebufferTestWithFormatFallback : public ANGLETest<>
{};

GLushort FramebufferTestWithFormatFallback::convertGLColorToUShort(GLenum internalFormat,
                                                                   const GLColor &color)
{}

// Test texture format fallback while it has staged updates.
void FramebufferTestWithFormatFallback::texImageFollowedByFBORead(GLenum internalFormat,
                                                                  GLenum type)
{}
TEST_P(FramebufferTestWithFormatFallback, R5G5B5A1_TexImage)
{}
TEST_P(FramebufferTestWithFormatFallback, R4G4B4A4_TexImage)
{}

// Test texture format fallback while it has staged updates and then do copyTexImage2D and followed
// by sampling.
void FramebufferTestWithFormatFallback::copyTexImageFollowedBySampling(GLenum internalFormat,
                                                                       GLenum type)
{}
TEST_P(FramebufferTestWithFormatFallback, R5G5B5A1_CopyTexImage)
{}
TEST_P(FramebufferTestWithFormatFallback, R4G4B4A4_CopyTexImage)
{}

// Test texture format fallback while it has staged updates and then do FBO blit and followed by
// copyTexImage2D.
void FramebufferTestWithFormatFallback::blitCopyFollowedByFBORead(GLenum internalFormat,
                                                                  GLenum type)
{}
TEST_P(FramebufferTestWithFormatFallback, R5G5B5A1_BlitCopyTexImage)
{}
TEST_P(FramebufferTestWithFormatFallback, RGBA4444_BlitCopyTexImage)
{}

// Test texture format fallback while it has staged updates, specially for cubemap target.
void FramebufferTestWithFormatFallback::cubeTexImageFollowedByFBORead(GLenum internalFormat,
                                                                      GLenum type)
{}
TEST_P(FramebufferTestWithFormatFallback, R5G5B5A1_CubeTexImage)
{}
TEST_P(FramebufferTestWithFormatFallback, R4G4B4A4_CubeTexImage)
{}

// Tests that the out-of-range staged update is reformatted when mipmapping is enabled, but not
// before it.
TEST_P(FramebufferTestWithFormatFallback, R4G4B4A4_OutOfRangeStagedUpdateReformated)
{}

// Tests that the texture is reformatted when the clear is done through the draw path.
TEST_P(FramebufferTestWithFormatFallback, R4G4B4A4_MaskedClear)
{}

// Tests that glGenerateMipmap works when the format is converted to renderable..
TEST_P(FramebufferTestWithFormatFallback, R4G4B4A4_GenerateMipmap)
{}

// Tests that when reformatting the image, incompatible updates don't cause a problem.
TEST_P(FramebufferTestWithFormatFallback, R4G4B4A4_InCompatibleFormat)
{}

class FramebufferTest_ES31 : public ANGLETest<>
{};

// Test that without attachment, if either the value of FRAMEBUFFER_DEFAULT_WIDTH or
// FRAMEBUFFER_DEFAULT_HEIGHT parameters is zero, the framebuffer is incomplete.
TEST_P(FramebufferTest_ES31, IncompleteMissingAttachmentDefaultParam)
{}

// Test that the sample count of a mix of texture and renderbuffer should be same.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleSampleCountMix)
{}

// Test that the sample count of texture attachments should be same.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleSampleCountTex)
{}

// Test that if the attached images are a mix of renderbuffers and textures, the value of
// TEXTURE_FIXED_SAMPLE_LOCATIONS must be TRUE for all attached textures.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleFixedSampleLocationsMix)
{}

// Test that the value of TEXTURE_FIXED_SAMPLE_LOCATIONS is the same for all attached textures.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleFixedSampleLocationsTex)
{}

// Tests that draw to Y-flipped FBO results in correct pixels.
TEST_P(FramebufferTest_ES31, BasicDrawToYFlippedFBO)
{}

// Test resolving a multisampled texture with blit
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlit)
{}

// Test resolving a multisampled texture with blit to a different format
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitDifferentFormats)
{}

// Test resolving a multisampled texture with blit after drawing to mulitiple FBOs.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitMultipleFBOs)
{}

// Test resolving a multisampled texture with blit after drawing to mulitiple FBOs.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitMultipleResolves)
{}

// Test resolving a multisampled texture with blit into an FBO with different read and draw
// attachments.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitDifferentReadDrawBuffers)
{}

// Test resolving a multisampled texture into a mipmaped texture with blit
TEST_P(FramebufferTest_ES31, MultisampleResolveIntoMipMapWithBlit)
{}

// Test resolving a multisampled texture with blit after drawing to multiple FBOs.
TEST_P(FramebufferTest_ES31, MultipleTextureMultisampleResolveWithBlitMultipleResolves)
{}

// Test resolving a multisampled texture with blit after drawing to multiple FBOs, with color
// attachment 1 resolved first.
TEST_P(FramebufferTest_ES31,
       MultipleTextureMultisampleResolveWithBlitMultipleResolvesAttachment1First)
{}

// Test resolving a multisampled texture with blit, then drawing multisampled again.  The latter
// should not get re-resolved automatically.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitThenDraw)
{}

// Test resolving a multisampled texture with blit, then drawing multisampled again.  The latter
// should not get re-resolved automatically.  Resoloves color attachment 1.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitThenDrawAttachment1)
{}

// Test resolving a multisampled texture with blit, then drawing multisampled again and resolving to
// same framebuffer.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitThenDrawThenResolveAgain)
{}

// Test resolving a multisampled texture with blit, then drawing multisampled again and resolving to
// another framebuffer.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitThenDrawThenResolveAgainToDifferentFBO)
{}

// Test resolving a multisampled texture with blit to a non-zero level.
TEST_P(FramebufferTest_ES31, MultisampleResolveWithBlitNonZeroLevel)
{}

// If there are no attachments, rendering will be limited to a rectangle having a lower left of
// (0, 0) and an upper right of(width, height), where width and height are the framebuffer
// object's default width and height.
TEST_P(FramebufferTest_ES31, RenderingLimitToDefaultFBOSizeWithNoAttachments)
{}

// Creating two attachmentless framebuffers should work without vvl error.
TEST_P(FramebufferTest_ES31, CreateNoAttachmentFBOWithDifferentSize)
{}

// Altering the default width and height of attachmentless framebuffer should work fine
TEST_P(FramebufferTest_ES31, ChangeFBOSizeWithNoAttachments)
{}

// Test that changing framebuffer attachment count and its' default width and height work properly
TEST_P(FramebufferTest_ES31, ChangeFBOSizeAndAttachmentsCount)
{}

// Test binding two textures with different widths to an FBO and drawing to it.
TEST_P(FramebufferTest_ES31, BindTexturesOfDifferentWidthsToFBOAndDraw)
{}

// Test binding two textures with different heights to an FBO and drawing to it.
TEST_P(FramebufferTest_ES31, BindTexturesOfDifferentHeightsToFBOAndDraw)
{}

// Test binding two textures with different formats to an FBO and drawing to it.
TEST_P(FramebufferTest_ES31, BindTexturesOfDifferentFormatsToFBOAndDraw)
{}

// Test binding two textures with different attachments to an FBO and drawing to it.
TEST_P(FramebufferTest_ES31, BindTexturesOfDifferentAttachmentsToFBOAndDraw)
{}

// Test binding two textures with different create flags to an FBO and drawing to it.
TEST_P(FramebufferTest_ES31, BindTexturesOfDifferentCreateFlagsToFBOAndDraw)
{}

// Test binding two textures with different usage flags to an FBO and drawing to it.
TEST_P(FramebufferTest_ES31, BindTexturesOfDifferentUsageFlagsToFBOAndDraw)
{}

// Test that clear with color masks on framebuffer texture with internal format GL_RGB5_A1 works
// This is a simplified version of below two deqp tests:
// KHR-GLES31.core.draw_buffers_indexed.color_masks
// KHR-GLES32.core.draw_buffers_indexed.color_masks
TEST_P(FramebufferTest_ES31, ClearWithColorMasksRGB5A1)
{}

void clearColorMorePrecisionThanFBOFormatNoDithering(const GLint &fboInternalFormat)
{}

// Verify that when clear color has more precision than FBO color attachment format can hold,
// dithering is not automatically applied.
// https://issuetracker.google.com/292282210
TEST_P(FramebufferTest_ES31, ClearColorMorePrecisionThanFBOFormatShouldNotApplyDithering)
{}

// Validates both MESA and standard functions can be used on OpenGL ES >=3.1
TEST_P(FramebufferTest_ES31, ValidateFramebufferFlipYMesaExtension)
{}

class AddMockTextureNoRenderTargetTest : public ANGLETest<>
{};

// Test to verify workaround succeeds when no program outputs exist http://anglebug.com/42260995
TEST_P(AddMockTextureNoRenderTargetTest, NoProgramOutputWorkaround)
{}

// Covers a bug in ANGLE's Vulkan back-end framebuffer cache which ignored depth/stencil after
// calls to DrawBuffers.
TEST_P(FramebufferTest_ES3, AttachmentStateChange)
{}

// Tests that we can support a color texture also attached to the color attachment but
// with different LOD. From GLES3.0 spec section 4.4.3.2, if min_filter is GL_NEAREST_MIPMAP_NEAREST
// and the lod is within the [base_level, max_level] range, and it is possible to sample from a LOD
// that is rendering to then it does form a feedback loop. But if it is using textureLOD to
// explicitly fetching texture on different LOD, there is no loop and should still work. Aztec_ruins
// (https://issuetracker.google.com/175584609) is doing exactly this.
TEST_P(FramebufferTest_ES3, SampleFromAttachedTextureWithDifferentLOD)
{}

// This extends the test SampleFromAttachedTextureWithDifferentLOD by creating two renderpasses
// without changing texture binding. This is to make sure that sample/render to the same texture
// still function properly when transition from one renderpass to another without texture binding
// change.
TEST_P(FramebufferTest_ES3, SampleFromAttachedTextureWithDifferentLODAndFBOSwitch)
{}

// Test render to a texture level that is excluded from [base_level, max_level]. This specific test
// renders to an immutable texture at the level that is bigger than GL_TEXTURE_MAX_LEVEL. The
// texture itself has not been initialized with any data before rendering (TexSubImage call may
// initialize a VkImage object).
TEST_P(FramebufferTest_ES3, RenderAndInvalidateImmutableTextureWithBeyondMaxLevel)
{}

// Test render to a texture level that is excluded from [base_level, max_level]. This specific test
// renders to an immutable texture at the level that is bigger than GL_TEXTURE_MAX_LEVEL. The
// texture itself has been initialized with data before rendering.
TEST_P(FramebufferTest_ES3, RenderAndInvalidateImmutableTextureWithSubImageWithBeyondMaxLevel)
{}

// Test render to a texture level that is excluded from [base_level, max_level]. This specific test
// renders to an immutable texture at the level that is smaller than GL_TEXTURE_BASE_LEVEL. The
// texture itself has been initialized with data before rendering. Filament is using it this way
TEST_P(FramebufferTest_ES3, RenderAndInvalidateImmutableTextureWithBellowBaseLevelLOD)
{}

// Test render to a texture level that is excluded from [base_level, max_level]. This specific test
// renders to an immutable texture at the level that is bigger than GL_TEXTURE_MAX_LEVEL. The
// texture level that we render to has been initialized with data before rendering. This test if
// render to that level will get flush the level update even though it is outside [base, max]
// levels.
TEST_P(FramebufferTest_ES3, RenderImmutableTextureWithSubImageWithBeyondMaxLevel)
{}

// Similar to the other RenderImmutableTexture*** tests, but test on depth attachment instead of
// color attachment. This tests render to a depth texture level that is less than
// GL_TEXTURE_BASE_LEVEL and sample from it at the same time.
TEST_P(FramebufferTest_ES3, RenderSampleDepthTextureWithExcludedLevel)
{}

// Covers a bug in ANGLE's Vulkan back-end. Our VkFramebuffer cache would in some cases forget to
// check the draw states when computing a cache key.
TEST_P(FramebufferTest_ES3, DisabledAttachmentRedefinition)
{}

// Test that changing the attachment of a framebuffer then sync'ing both READ and DRAW framebuffer
// (currently possible with glInvalidateFramebuffer) updates the scissor correctly.
TEST_P(FramebufferTest_ES3, ChangeAttachmentThenInvalidateAndDraw)
{}

// Test Framebuffer object with two attachments that have unequal size. In OpenGLES3.0, this is
// a supported config. The common intersection area should be correctly rendered. The contents
// outside common intersection area are undefined.
TEST_P(FramebufferTest_ES3, AttachmentsWithUnequalDimensions)
{}

// Validates only MESA functions can be used on OpenGL ES <3.1
TEST_P(FramebufferTest_ES3, ValidateFramebufferFlipYMesaExtension)
{}

TEST_P(FramebufferTest_ES3, FramebufferFlipYMesaExtensionIncorrectPname)
{}

class FramebufferTest : public ANGLETest<>
{};

template <typename T>
void FillTexture2D(GLuint texture,
                   GLsizei width,
                   GLsizei height,
                   const T &onePixelData,
                   GLint level,
                   GLint internalFormat,
                   GLenum format,
                   GLenum type)
{}

// Multi-context uses of textures should not cause rendering feedback loops.
TEST_P(FramebufferTest, MultiContextNoRenderingFeedbackLoops)
{}

// Ensure cube-incomplete attachments cause incomplete Framebuffers.
TEST_P(FramebufferTest, IncompleteCubeMap)
{}

// Test FBOs with different sizes are drawn correctly
TEST_P(FramebufferTest, BindAndDrawDifferentSizedFBOs)
{}

// Test FBOs with same attachments. Destroy one framebuffer should not affect the other framebuffer
// (chromium:1351170).
TEST_P(FramebufferTest_ES3, TwoFramebuffersWithSameAttachments)
{}

// Regression test based on a fuzzer failure.  A crash was encountered in the following situation:
//
// - Texture bound as sampler with MAX_LEVEL 0
// - Framebuffer bound to level 0
// - Draw
// - Texture MAX_LEVEL changed to 1
// - Framebuffer bound to level 1
// - Draw
//
// Notes: Removing the first half removed the crash.  MIN_FILTERING of LINEAR vs
// LINEAR_MIPMAP_LINEAR did not make any changes.
TEST_P(FramebufferTest_ES3, FramebufferBindToNewLevelAfterMaxIncreaseShouldntCrash)
{}

// Modify renderbuffer attachment samples after bind
TEST_P(FramebufferTest_ES3, BindRenderbufferThenModifySamples)
{}

// Modify renderbuffer attachment size after bind
TEST_P(FramebufferTest_ES3, BindRenderbufferThenModifySize)
{}

// Tests redefining a layered framebuffer attachment.
TEST_P(FramebufferTest_ES3, RedefineLayerAttachment)
{}

// Covers a bug when changing a base level of a texture bound to a FBO.
TEST_P(FramebufferTest_ES3, ReattachToInvalidBaseLevel)
{}

// Ensure that clear color is correctly applied after invalidate
TEST_P(FramebufferTest_ES3, InvalidateClearDraw)
{}

// Produces VUID-VkImageMemoryBarrier-oldLayout-01197 VVL error with a "Render pass closed due to
// framebuffer change" command buffer label. As seen in Black Desert Mobile.
// The application draws 2 passes to produce the issue. First pass draws to a depth only frame
// buffer, the second one to a different color+depth frame buffer. The second pass samples the first
// passes frame buffer in two draw calls. First draw call samples it in the fragment stage, second
// in the the vertex stage.
TEST_P(FramebufferTest_ES3, FramebufferChangeTest)
{}

// Regression test for a bug in the Vulkan backend where the application produces a conditional
// framebuffer feedback loop which results in VUID-VkDescriptorImageInfo-imageLayout-00344 and
// VUID-vkCmdDraw-None-02699 (or VUID-vkCmdDrawIndexed-None-02699 when a different draw call is
// used). The application samples from the frame buffer it renders to depending on a uniform
// condition.
TEST_P(FramebufferTest_ES3, FramebufferConditionalFeedbackLoop)
{}

// Regression test for a bug in the Vulkan backend where sampling from a
// texture previously involved in a framebuffer feedback loop would produce
// VUID-VkDescriptorImageInfo-imageLayout-00344 and VUID-vkCmdDraw-None-02699
// because of an incorrect cached descriptor set.
TEST_P(FramebufferTest_ES3, FeedbackLoopTextureBindings)
{}

// Tests change of framebuffer dimensions vs gl_FragCoord.
TEST_P(FramebufferTest_ES3, FramebufferDimensionsChangeAndFragCoord)
{}

// Tests change of surface dimensions vs gl_FragCoord.
TEST_P(FramebufferTest_ES3, SurfaceDimensionsChangeAndFragCoord)
{}

// Tests blits between draw and read surfaces with different pre-rotation values.
TEST_P(FramebufferTest_ES3, BlitWithDifferentPreRotations)
{}

// Tests draw to surfaces with different pre-rotation values.
TEST_P(FramebufferTest_ES3, DrawWithDifferentPreRotations)
{}

class FramebufferExtensionsTest : public FramebufferTest
{};

// Tests that GL_EXT_color_buffer_half_float enables component type state queries on
// framebuffer attachments.
TEST_P(FramebufferExtensionsTest, ColorBufferHalfFloat)
{}

// Tests that GL_CHROMIUM_color_buffer_float_rgb enables component type state queries on
// framebuffer attachments.
TEST_P(FramebufferExtensionsTest, ColorBufferFloatRgb)
{}

// Tests that GL_CHROMIUM_color_buffer_float_rgba enables component type state queries on
// framebuffer attachments.
TEST_P(FramebufferExtensionsTest, ColorBufferFloatRgba)
{}

class DefaultFramebufferTest : public ANGLETest<>
{};

// glReadPixel from default FBO with format and type retrieved from
// GL_IMPLEMENTATION_COLOR_READ_FORMAT and GL_IMPLEMENTATION_COLOR_READ_TYPE
// should work
TEST_P(DefaultFramebufferTest, ReadFromDefaultFBOOnDefaultEGLWindowSurface)
{}

// Test resolving the same framebuffer into two different ones
TEST_P(FramebufferTest_ES31, MultisampleResolveMultipleTimes)
{}

// Test resolving the same depth/stencil attachment into two different framebuffers
TEST_P(FramebufferTest_ES31, MultisampleDepthStencilResolveMultipleTimes)
{}

// Test resolving the same framebuffer into two different ones with a draw in between
TEST_P(FramebufferTest_ES31, MultisampleResolveMultipleTimesWithDrawInBetween)
{}

// Test resolving the same depth/stencil framebuffer into two different ones with a draw in between
TEST_P(FramebufferTest_ES31, MultisampleDepthStencilResolveMultipleTimesWithDrawInBetween)
{}

// Test resolving different attachments of an FBO to separate FBOs
TEST_P(FramebufferTest_ES31, MultisampleResolveBothAttachments)
{}

// Test resolving a framebuffer once, then drawing to it again without a resolve.  Makes sure there
// is no caching bug that would make the second render pass resolve into the old resolve target
// again.
TEST_P(FramebufferTest_ES31, ResolveThenDrawWithoutResolve)
{}

// Test resolving a depth/stencil framebuffer once, then drawing to it again without a resolve.
// Makes sure there is no caching bug that would make the second render pass resolve into the old
// resolve target again.
TEST_P(FramebufferTest_ES31, DepthStencilResolveThenDrawWithoutResolve)
{}

// Test resolving a framebuffer once, then drawing to it again without a complete resolve, and then
// drawing again with a resolve to same or another framebuffer.
TEST_P(FramebufferTest_ES31, ResolveThenDrawWithoutResolveThenDrawWithResolve)
{}

// Test resolving a depth/stencil framebuffer once, then drawing to it again without a complete
// resolve, and then drawing again with a resolve to same or another framebuffer.
TEST_P(FramebufferTest_ES31, DepthStencilResolveThenDrawWithoutResolveThenDrawWithResolve)
{}

// Test resolving a framebuffer once, then changing its attachment (with the same format) and
// draw+resolving again.  Makes sure the wrong framebuffer or render pass is not picked from a
// cache.
TEST_P(FramebufferTest_ES31, ResolveThenChangeAttachmentThenResolveAgain)
{}

// Test resolving a depth/stencil framebuffer once, then changing its attachment (with the same
// format) and draw+resolving again.  Makes sure the wrong framebuffer or render pass is not picked
// from a cache.
TEST_P(FramebufferTest_ES31, DepthStencilResolveThenChangeAttachmentThenResolveAgain)
{}

// Similar to ResolveThenChangeAttachmentThenResolveAgain, but the attachment format is also changed
TEST_P(FramebufferTest_ES31, ResolveThenChangeAttachmentFormatThenResolveAgain)
{}

// Draw and resolve once, use the resolve attachment as a storage image, then draw and resolve
// again.  The storage image usage may recreate the image internally, and this test makes sure the
// wrong framebuffer or render pass is not picked from a cache.
TEST_P(FramebufferTest_ES31, ResolveThenUseAsStorageImageThenResolveAgain)
{}

// Test that invalidation tracking works when glBlitFramebuffer resolves into an invalidated
// framebuffer.
TEST_P(FramebufferTest_ES31, InvalidateThenResolve)
{}

ANGLE_INSTANTIATE_TEST_ES2_AND();

ANGLE_INSTANTIATE_TEST_ES2();
ANGLE_INSTANTIATE_TEST_ES2();
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES3_AND();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES31_AND();
ANGLE_INSTANTIATE_TEST_ES3();
ANGLE_INSTANTIATE_TEST_ES3();