Lines Matching +full:fetch +full:- +full:depth
3 // Use of this source code is governed by a BSD-style license that can be
39 // Shared simple (i.e. no framebuffer fetch) Fragment Shaders for the tests below
41 // Simple (i.e. no framebuffer fetch) 3.1 GLSL fragment shader that writes to 1 attachment
139 // non-fetch program and fetch program with different attachments (version 1)
157 // of non-fetch program and fetch program with different attachments (version 2)
236 gl_FragData[1] -= gl_LastFragData[1];
237 gl_FragData[3] -= gl_LastFragData[3];
285 // Shared Non-Coherent Fragment Shaders for the tests below
287 // Non-coherent version of a 1.0 GLSL fragment shader that uses gl_LastFragData
298 // Non-coherent version of a 3.1 GLSL fragment shader that writes to 1 attachment
309 // Non-coherent version of a 3.1 GLSL fragment shader that writes the output to a storage buffer.
326 // Non-coherent version of a 1.0 GLSL fragment shader that writes to 4 attachments with constant
342 // Non-coherent version of a 3.1 GLSL fragment shader that writes to 4 attachments
359 // Non-coherent version of a 3.1 GLSL fragment shader that writes to 4 attachments via an inout
374 // Non-coherent version of a 3.1 GLSL fragment shader that writes to 4 attachments with the order
375 // of non-fetch program and fetch program with different attachments (version 1)
392 // Non-coherent version of a 3.1 GLSL fragment shader that writes to 4 attachments with the order
393 // of non-fetch program and fetch program with different attachments (version 2)
410 // Non-coherent version of a 3.1 GLSL fragment shader that writes to 4 attachments, fetching from
428 // Non-coherent version of a 3.1 GLSL fragment shader that writes to 4 attachments, fetching from
446 // Non-coherent version of a 1.0 GLSL fragment shader with complex interactions
473 gl_FragData[1] -= gl_LastFragData[1];
474 gl_FragData[3] -= gl_LastFragData[3];
480 // Non-coherent version of a 3.1 GLSL fragment shader with complex interactions
626 gl_FragData[0] -= gl_LastFragColorARM;
627 gl_FragData[2] -= gl_LastFragData[2];
850 -1.0f, -1.0f, +1.0f, -1.0f, +1.0f, +1.0f, -1.0f, +1.0f, in render()
1113 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawNonFetchDrawFetchTest()
1132 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawNonFetchDrawFetchTest()
1165 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawFetchDrawNonFetchTest()
1187 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawFetchDrawNonFetchTest()
1223 // Zero-initialize it in DrawNonFetchDrawFetchInStorageBufferTest()
1251 // Mask color output. The no-fetch draw call should be a no-op, and the fetch draw-call in DrawNonFetchDrawFetchInStorageBufferTest()
1267 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawNonFetchDrawFetchInStorageBufferTest()
1274 // fetch draw. in DrawNonFetchDrawFetchInStorageBufferTest()
1287 // Read back the storage buffer and make sure framebuffer fetch worked as intended despite in DrawNonFetchDrawFetchInStorageBufferTest()
1372 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawNonFetchDrawFetchWithDifferentAttachmentsTest()
1411 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawNonFetchDrawFetchWithDifferentAttachmentsTest()
1481 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawNonFetchDrawFetchWithDifferentProgramsTest()
1505 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawNonFetchDrawFetchWithDifferentProgramsTest()
1551 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawFetchWithDifferentIndicesInSameRenderPassTest()
1566 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawFetchWithDifferentIndicesInSameRenderPassTest()
1623 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawFetchBlitDrawFetchTest()
1666 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in DrawFetchBlitDrawFetchTest()
1781 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in ProgramPipelineTest()
1813 // Render potentially with a glFramebufferFetchBarrierEXT() depending on the [non-]coherent in ProgramPipelineTest()
1844 // Create FBO with depth/stencil in framebufferFetchDepthStencilDetachSeparately()
1863 // CASE 1: Detach stencil, depth is still attached in framebufferFetchDepthStencilDetachSeparately()
1875 // CASE 2: Detach depth and attach old stencil in framebufferFetchDepthStencilDetachSeparately()
1889 // CASE 3: Attach old depth in framebufferFetchDepthStencilDetachSeparately()
1950 bool depth = depthFormatBitCount(depthStencilFormat) > 0; in getFragShaderName() local
1953 if (depth && stencil) in getFragShaderName()
1957 else if (depth) in getFragShaderName()
2177 // Helpers for tests that don't care whether coherent or non-coherent framebuffer fetch is
2180 // variant or depth/stencil.
2272 // Test non-coherent extension with inout qualifier
2300 // Test non-coherent extension with gl_LastFragData
2373 // Testing non-coherent extension with multiple render target, using gl_FragData with constant
2389 // Testing non-coherent extension with multiple render target, using gl_FragData with complex
2405 // Testing non-coherent extension with multiple render target, using inouts with complex expressions
2419 // Testing non-coherent extension with multiple render target
2433 // Testing non-coherent extension with multiple render target using inout array
2475 // Test non-coherent extension with multiple draw
2489 // Testing coherent extension with the order of non-fetch program and fetch program
2503 // Testing non-coherent extension with the order of non-fetch program and fetch program
2517 // Testing coherent extension with the order of fetch program and non-fetch program
2531 // Testing non-coherent extension with the order of fetch program and non-fetch program
2545 // Testing coherent extension with framebuffer fetch read in combination with color attachment mask
2564 // Testing non-coherent extension with framebuffer fetch read in combination with color attachment
2584 // Testing coherent extension with the order of non-fetch program and fetch program with
2599 // Testing coherent extension with framebuffer fetch read in combination with color attachment mask
2619 // Testing non-coherent extension with framebuffer fetch read in combination with color attachment
2639 // Testing non-coherent extension with the order of non-fetch program and fetch program with
2654 // Testing coherent extension with the order of non-fetch program and fetch with different
2670 // Testing non-coherent extension with the order of non-fetch program and fetch with different
2686 // Testing coherent extension with two fetch programs using different attachments. The different
2687 // sets of attachments start at different non-zero indices.
2701 // Testing non-coherent extension with two fetch programs using different attachments. The
2702 // different sets of attachments start at different non-zero indices.
2716 // Testing coherent extension with the order of draw fetch, blit and draw fetch
2730 // Testing non-coherent extension with the order of draw fetch, blit and draw fetch
2754 // Testing non-coherent extension with program pipeline
2764 // Verify that sample shading is automatically enabled when framebuffer fetch is used with
2774 // Create a single-sampled framebuffer as the resolve target in TEST_P()
2790 // Initialize every sample differently with per-sample shading. in TEST_P()
2825 // Use framebuffer fetch to read the value of each sample, and store the square of that value. in TEST_P()
2826 // Because square is non-linear, applied to the average value it would produce a different in TEST_P()
2828 // ensures that framebuffer fetch on a multisampled framebuffer implicitly enables sample in TEST_P()
2849 // For debugging purposes, the following would be true if framebuffer fetch _didn't_ implicitly in TEST_P()
2856 // Test recovering a supposedly closed render pass that used framebuffer fetch.
2878 // Use a framebuffer fetch program. in TEST_P()
2905 // Switch back to the original framebuffer and do a non-framebuffer fetch draw in TEST_P()
2909 glScissor(kViewportWidth / 2, kViewportHeight / 2, kViewportWidth - kViewportWidth / 2, in TEST_P()
2910 kViewportHeight - kViewportHeight / 2); in TEST_P()
2915 EXPECT_PIXEL_COLOR_EQ(kViewportWidth - 1, kViewportHeight - 1, GLColor::red); in TEST_P()
2931 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
2932 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
2933 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
2994 EXPECT_PIXEL_NEAR(kViewportWidth - 1, kViewportHeight - 1, 191, 159, 255, 255, 1); in TEST_P()
3010 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
3011 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
3012 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
3075 EXPECT_PIXEL_NEAR(kViewportWidth - 1, kViewportHeight - 1, 191, 159, 255, 255, 1); in TEST_P()
3347 // Verify we can render to the default framebuffer without fetch, then switch to a program
3348 // that does fetch.
3404 // Create another program that DOES fetch from the framebuffer in TEST_P()
3418 // Switch back to the non-fetched framebuffer, and render green in TEST_P()
3426 // Verify we can render to a framebuffer with fetch, then switch to another framebuffer (without
3466 // Create a program that DOES fetch from the framebuffer in TEST_P()
3473 // Create an empty framebuffer to use without fetch in TEST_P()
3484 // Draw to it with green, without using fetch, overwriting any contents in TEST_P()
3491 // Create another framebuffer to use WITH fetch, and initialize it with blue in TEST_P()
3509 // Now use the same program (WITH fetch) and render to the other framebuffer that was NOT used in TEST_P()
3510 // with fetch. This verifies the framebuffer state is appropriately updated to match the in TEST_P()
3518 // Verify that switching between single sampled framebuffer fetch and multi sampled framebuffer
3519 // fetch works fine
3669 // Testing ARM extension with the order of non-fetch program and fetch program
3683 // Testing ARM extension with the order of fetch program and non-fetch program
3697 // Testing ARM extension with framebuffer fetch read in combination with color attachment mask
3716 // Testing ARM extension with framebuffer fetch read in combination with color attachment mask
3853 // Verify we can render to the default framebuffer without fetch, then switch to a program
3854 // that does fetch.
3910 // Create another program that DOES fetch from the framebuffer in TEST_P()
3924 // Switch back to the non-fetched framebuffer, and render green in TEST_P()
3932 // Verify we can render to a framebuffer with fetch, then switch to another framebuffer (without
3972 // Create a program that DOES fetch from the framebuffer in TEST_P()
3979 // Create an empty framebuffer to use without fetch in TEST_P()
3990 // Draw to it with green, without using fetch, overwriting any contents in TEST_P()
3997 // Create another framebuffer to use WITH fetch, and initialize it with blue in TEST_P()
4015 // Now use the same program (WITH fetch) and render to the other framebuffer that was NOT used in TEST_P()
4016 // with fetch. This verifies the framebuffer state is appropriately updated to match the in TEST_P()
4024 // Verify that switching between single sampled framebuffer fetch and multi sampled framebuffer
4025 // fetch works fine
4140 GLint isFetchPerSampleEnabledInt = -1; in TEST_P()
4141 GLfloat isFetchPerSampleEnabledFloat = -1.0f; in TEST_P()
4171 GLint isFragmentShaderFramebufferFetchMrtInt = -1; in TEST_P()
4172 GLfloat isFragmentShaderFramebufferFetchMrtFloat = -1.0f; in TEST_P()
4200 // Test that depth/stencil framebuffer fetch with early_fragment_tests is disallowed
4265 // Testing using both extentions simultaneously with the order of non-fetch program and fetch
4281 // Testing using both extentions simultaneously with the order of fetch program and non-fetch
4394 // with framebuffer fetch and blend. in TEST_P()
4427 ANGLE_GL_PROGRAM(fetch, essl31_shaders::vs::Passthrough(), fetchFs.str().c_str()); in TEST_P()
4434 drawQuad(fetch, essl31_shaders::PositionAttrib(), 0.0f); in TEST_P()
4456 // Test that depth framebuffer fetch works.
4457 TEST_P(FramebufferFetchES31, Depth) in TEST_P() argument
4471 GLRenderbuffer color, depth; in TEST_P() local
4480 glBindRenderbuffer(GL_RENDERBUFFER, depth); in TEST_P()
4482 glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depth); in TEST_P()
4497 // Test that stencil framebuffer fetch works.
4539 // Test that depth and stencil framebuffer fetch work simultaneously and with the built-ins
4574 // Test that depth and stencil framebuffer fetch works with MSAA.
4632 // Test that depth and stencil framebuffer fetch works with MSRTT textures.
4678 // Test that depth and stencil framebuffer fetch works with MSRTT renderbuffers.
4725 // Test that depth and stencil framebuffer fetch works with textures
4769 // Test that depth and stencil framebuffer fetch works with layered framebuffers
4830 // Test that depth and stencil framebuffer fetch works with default framebuffer
4859 // Tests that accessing gl_LastFragDepthARM or gl_LastFragStencilARM without attached depth or
4907 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
4908 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
4909 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
4961 // Remove the depth attachment, and issue another draw call to the other half. in TEST_P()
4966 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
4971 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight / 2 - 1, 255, 153, 0, 255, 1); in TEST_P()
4985 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
4986 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
4987 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
5032 // Add a depth attachment, and issue another draw call to the other half. in TEST_P()
5041 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
5049 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight - 1, 255, 153, 0, 255, 1); in TEST_P()
5064 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
5065 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
5066 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
5124 // Switch framebuffers to the one that doesn't have a depth/stencil attachment. in TEST_P()
5127 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
5132 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight / 2 - 1, 255, 153, 0, 255, 1); in TEST_P()
5147 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
5148 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
5149 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
5208 // Switch framebuffers to the one that does have a depth/stencil attachment. in TEST_P()
5211 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
5216 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight - 1, 255, 153, 0, 255, 1); in TEST_P()
5230 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
5231 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
5232 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
5284 // Remove the depth attachment, and issue another draw call to the other half. in TEST_P()
5289 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
5309 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight / 2 - 1, 255, 153, 0, 255, 1); in TEST_P()
5313 // Test that depth and stencil framebuffer fetch work simultaneously and
5314 // verify whether detaching the depth attachment and stencil attachment separately
5325 // Test that depth and stencil framebuffer fetch work simultaneously and
5326 // verify whether detaching the depth attachment and stencil attachment separately
5337 // Test that framebuffer fetch works as expected when GL_FETCH_PER_SAMPLE_ARM is disabled.
5368 // Test that the discard functionality works as expected during framebuffer fetch when
5410 // Test that framebuffer fetch works as expected under the conditions of multisample and with
5450 // Test that framebuffer fetch works as expected under the conditions of multisample and with
5490 // Test that the discard functionality works as expected during framebuffer fetch with multisample
5543 // Test that the discard functionality works as expected during framebuffer fetch with multisample
5606 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
5607 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
5608 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
5653 // Add a depth attachment, and issue another draw call to the other half. in TEST_P()
5662 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
5685 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight - 1, 255, 153, 0, 255, 1); in TEST_P()
5689 // Similar to DrawWithAndWithoutDepthAndStencilMSAA, but color framebuffer fetch is simultaneously
5701 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
5702 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
5703 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
5757 // Remove the depth attachment, and issue another draw call to the other half. in TEST_P()
5762 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
5782 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight / 2 - 1, 255, 153, 63, 127, 1); in TEST_P()
5786 // Similar to DrawWithoutAndWithDepthAndStencilMSAA, but color framebuffer fetch is simultaneously
5798 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
5799 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
5800 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
5847 // Add a depth attachment, and issue another draw call to the other half. in TEST_P()
5856 glScissor(0, kHeight / 2, kWidth, kHeight - kHeight / 2); in TEST_P()
5879 EXPECT_PIXEL_NEAR(kWidth - 1, kHeight - 1, 255, 153, 63, 127, 1); in TEST_P()
5883 // Test that depth and stencil framebuffer fetch works with pbuffers
5901 EGLConfig config = window->getConfig(); in TEST_P()
5902 EGLContext context = window->getContext(); in TEST_P()
5903 EGLDisplay dpy = window->getDisplay(); in TEST_P()
5937 EXPECT_EGL_TRUE(eglMakeCurrent(dpy, window->getSurface(), window->getSurface(), context)); in TEST_P()
5944 // Test that depth framebuffer fetch works with color framebuffer fetch
5974 // Test that stencil framebuffer fetch works with color framebuffer fetch
6005 // Test that depth/stencil framebuffer fetch works with color framebuffer fetch
6037 // Test that mixing depth-only and stencil-only framebuffer fetch programs work
6080 ANGLE_GL_PROGRAM(depth, essl31_shaders::vs::Passthrough(), kDepthFS); in TEST_P()
6084 drawQuad(depth, essl31_shaders::PositionAttrib(), 0.0f); in TEST_P()
6094 // Test that starting without framebuffer fetch, then doing framebuffer fetch works.
6137 ANGLE_GL_PROGRAM(depth, essl31_shaders::vs::Passthrough(), kDepthFS); in TEST_P()
6144 drawQuad(depth, essl31_shaders::PositionAttrib(), 0.0f); in TEST_P()
6151 // Test that depth/stencil framebuffer fetch is actually coherent by writing to depth/stencil in one
6192 // Write depth (0.4 or 0.8 by the shader) and stencil (0x5B) in one draw call in TEST_P()
6210 EXPECT_PIXEL_RECT_EQ(kViewportWidth / 2, 0, kViewportWidth - kViewportWidth, kViewportHeight, in TEST_P()
6248 // For completeness, verify that gl_FragDepth did write to depth. in TEST_P()
6265 // Test that render pass can start with D/S framebuffer fetch, then color framebuffer fetch is used.
6307 EXPECT_PIXEL_COLOR_NEAR(kViewportWidth - 1, kViewportHeight - 1, GLColor(127, 204, 0, 255), 1); in TEST_P()
6311 // Test that render pass can start without framebuffer fetch, then do D/S framebuffer fetch, then
6312 // color framebuffer fetch. This test uses PPOs.
6325 case 0: pos = vec2(-1.0, -1.0); break; in TEST_P()
6326 case 1: pos = vec2(3.0, -1.0); break; in TEST_P()
6327 case 2: pos = vec2(-1.0, 3.0); break; in TEST_P()
6388 EXPECT_PIXEL_COLOR_NEAR(kViewportWidth - 1, kViewportHeight - 1, GLColor(127, 204, 255, 255), in TEST_P()
6393 // Test that using the maximum number of color attachments works in conjunction with depth/stencil
6394 // framebuffer fetch.
6461 // Test that depth/stencil framebuffer fetch works with advanced blend
6496 EXPECT_PIXEL_NEAR(kViewportWidth - 1, kViewportHeight - 1, 255, 148, 51, 204, 1); in TEST_P()
6500 // Test switching between framebuffer fetch and non framebuffer fetch draw calls, with multiple
6501 // calls in each mode in between. Tests Vulkan backend's emulation of coherent framebuffer fetch
6502 // over non-coherent hardware. While this is untestable without adding counters, the test should
6503 // generate implicit framebuffer fetch barriers only when the current program uses framebuffer
6504 // fetch. This can be observed in RenderDoc.
6513 // 0 -1 -1 in TEST_P()
6514 // 1 1 -1 in TEST_P()
6515 // 2 -1 1 in TEST_P()
6519 gl_Position = vec4(bit0 * 2 - 1, bit1 * 2 - 1, 0, 1); in TEST_P()
6522 // Program without framebuffer fetch in TEST_P()
6533 ASSERT_NE(uniLoc, -1); in TEST_P()
6535 // Program with framebuffer fetch in TEST_P()
6558 // Start without framebuffer fetch. in TEST_P()
6567 // Switch to framebuffer fetch mode, and draw a few times in TEST_P()
6573 // Break the render pass. Later continue drawing in framebuffer fetch mode without changing in TEST_P()
6574 // programs to ensure that framebuffer fetch barrier is still added. in TEST_P()
6716 EXPECT_PIXEL_RECT_EQ(8, 0, getWindowWidth() - 8, getWindowHeight(), GLColor::magenta); in TEST_P()
6719 // Verify that early out from main stops write-only |inout| variables from turning into |out|
6751 EXPECT_PIXEL_RECT_EQ(8, 0, getWindowWidth() - 8, getWindowHeight(), GLColor::magenta); in TEST_P()
6754 // Verify that discard in the shader stops write-only |inout| variables from turning into |out|
6791 EXPECT_PIXEL_RECT_EQ(8, 0, getWindowWidth() - 8, getWindowHeight(), GLColor::magenta); in TEST_P()