From f8540a99d85b322eb826249746f08111f0137fa8 Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Thu, 23 Oct 2014 13:58:13 -0700 Subject: [PATCH] Add blend barrier after first opaque quad Advanced blending tests were missing barrier between first opaque quad and subsequent blended quads. This change adds BlendBarrier() call if coherent blending is not enabled. This change also adds fullscreen clear before rendering as framework doesn't perform that in GLES31 module. Bug: 18100652 Change-Id: Idd16f2fde543af885e97adf5b5c2123d7e803152 --- modules/gles31/functional/es31fAdvancedBlendTests.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/gles31/functional/es31fAdvancedBlendTests.cpp b/modules/gles31/functional/es31fAdvancedBlendTests.cpp index dcde00f..aed9395 100644 --- a/modules/gles31/functional/es31fAdvancedBlendTests.cpp +++ b/modules/gles31/functional/es31fAdvancedBlendTests.cpp @@ -419,10 +419,15 @@ AdvancedBlendCase::IterateResult AdvancedBlendCase::iterate (void) GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to set render state"); + gl.clear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); + gl.disable(GL_BLEND); gl.drawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, DE_NULL); gl.enable(GL_BLEND); + if (!m_coherentBlending) + gl.blendBarrierKHR(); + if (m_coherentBlending) { gl.drawElements(GL_TRIANGLES, 6*(numQuads-1), GL_UNSIGNED_SHORT, (const void*)(deUintptr)(6*sizeof(deUint16))); -- 2.7.4