[Bug 94455] dEQP rgba8888d32s8 FBO mode doesn't work

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Oct 25 10:49:34 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=94455

--- Comment #1 from Iago Toral <itoral at igalia.com> ---
It seems that the cause of this is a bug in dEQP, that confuses the number of
bits in the stencil buffer with the number of bits in the depth buffer when it
renders the reference image.

Specifically, the test passes the depthBits where it should be passing
stencilBits (so 32 where it should be using 8). As result, when it uses the
number of stencil bits here:

int maskedVal = clear.stencil & ((1<<stencilBits)-1);

The result of ((1<<stencilBits)-1) overflows and causes incorrect result in
maskedVal (the value to clear the stencil buffer to). For values of stencilBits
that do not cause overflow (so 24, 16 or 8), the result of the AND operation
leads to the same result as if we passed the correct number of stencil bits.
That explains why the test only fails when we have 32b depth and stencil > 0b.

This patch to dEQP fixes the specific test case mentioned in the bug report and
should fix others as well:

diff --git a/modules/gles2/functional/es2fDepthStencilTests.cpp
b/modules/gles2/functional/es2fDepthStencilTests.cpp
index 793c7a3..eacda9e 100644
--- a/modules/gles2/functional/es2fDepthStencilTests.cpp
+++ b/modules/gles2/functional/es2fDepthStencilTests.cpp
@@ -669,7 +669,7 @@ DepthStencilCase::IterateResult DepthStencilCase::iterate
(void)
                translateCommand(testCmd, refTestCmd, m_renderTarget);

                // Base clears.
-               renderReference(m_baseClears, m_refColorBuffer->getAccess(),
m_refStencilBuffer->getAccess(), m_renderTarget.depthBits);
+               renderReference(m_baseClears, m_refColorBuffer->getAccess(),
m_refStencilBuffer->getAccess(), m_renderTarget.stencilBits);

                // Base depths.
                for (vector<RefRenderCommand>::const_iterator cmd =
m_refBaseDepthRenders.begin(); cmd != m_refBaseDepthRenders.end(); ++cmd)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20161025/11f89dd9/attachment.html>


More information about the intel-3d-bugs mailing list