Vulkan: Implement framebuffers without attachments
It is possible to render to a framebuffer object that has no
attachments. However, the rasterization of primitives is always
based on the area and characteristics of the bound framebuffer.
These characteristics (size, number of samples, etc.) would normally be
defined by the attached images. If no images are attached, these
characteristics are defined by their default values.
Bug: angleproject:3579
Test: dEQP-GLES31.functional.fbo.*no_attachments*
Test: dEQP-GLES31.functional.state_query.framebuffer_default.*
Change-Id: I9580b924ac810db573cd8df96273fbb01bbb1f73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1690688
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
diff --git a/src/tests/gl_tests/FramebufferTest.cpp b/src/tests/gl_tests/FramebufferTest.cpp
index 5b58588..247c284 100644
--- a/src/tests/gl_tests/FramebufferTest.cpp
+++ b/src/tests/gl_tests/FramebufferTest.cpp
@@ -679,6 +679,9 @@
// FRAMEBUFFER_DEFAULT_HEIGHT parameters is zero, the framebuffer is incomplete.
TEST_P(FramebufferTest_ES31, IncompleteMissingAttachmentDefaultParam)
{
+ // anglebug.com/3565
+ ANGLE_SKIP_TEST_IF(IsVulkan());
+
GLFramebuffer mFramebuffer;
glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer.get());
@@ -707,6 +710,9 @@
// Test that the sample count of a mix of texture and renderbuffer should be same.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleSampleCountMix)
{
+ // anglebug.com/3565
+ ANGLE_SKIP_TEST_IF(IsVulkan());
+
GLFramebuffer mFramebuffer;
glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer.get());
@@ -730,6 +736,9 @@
// Test that the sample count of texture attachments should be same.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleSampleCountTex)
{
+ // anglebug.com/3565
+ ANGLE_SKIP_TEST_IF(IsVulkan());
+
GLFramebuffer mFramebuffer;
glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer.get());
@@ -752,6 +761,9 @@
// TEXTURE_FIXED_SAMPLE_LOCATIONS must be TRUE for all attached textures.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleFixedSampleLocationsMix)
{
+ // anglebug.com/3565
+ ANGLE_SKIP_TEST_IF(IsVulkan());
+
GLFramebuffer mFramebuffer;
glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer.get());
@@ -775,6 +787,9 @@
// Test that the value of TEXTURE_FIXED_SAMPLE_LOCATIONS is the same for all attached textures.
TEST_P(FramebufferTest_ES31, IncompleteMultisampleFixedSampleLocationsTex)
{
+ // anglebug.com/3565
+ ANGLE_SKIP_TEST_IF(IsVulkan());
+
GLFramebuffer mFramebuffer;
glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer.get());
@@ -800,6 +815,8 @@
{
// anglebug.com/2253
ANGLE_SKIP_TEST_IF(IsLinux() && IsAMD() && IsDesktopOpenGL());
+ // Occlusion query reports fragments outside the render area are still rendered
+ ANGLE_SKIP_TEST_IF(IsAndroid() || (IsWindows() && (IsIntel() || IsAMD())));
constexpr char kVS1[] = R"(#version 310 es
in layout(location = 0) highp vec2 a_position;
@@ -909,7 +926,11 @@
ASSERT_GL_NO_ERROR();
}
-ANGLE_INSTANTIATE_TEST(FramebufferTest_ES31, ES31_D3D11(), ES31_OPENGL(), ES31_OPENGLES());
+ANGLE_INSTANTIATE_TEST(FramebufferTest_ES31,
+ ES31_D3D11(),
+ ES31_OPENGL(),
+ ES31_OPENGLES(),
+ ES31_VULKAN());
class AddDummyTextureNoRenderTargetTest : public ANGLETest
{