Bug 59494

Summary: [Bisected]Piglit glean_depthStencil fails
Product: Mesa Reporter: lu hua <huax.lu>
Component: Mesa coreAssignee: Matt Turner <mattst88>
Status: VERIFIED FIXED QA Contact: mesa-dev
Severity: major    
Priority: high CC: idr, jljusten, vlee, xunx.fang
Version: unspecified   
Hardware: All   
OS: Linux (All)   
URL: http://lists.freedesktop.org/archives/mesa-dev/2013-January/033746.html
Whiteboard:
i915 platform: i915 features:

Description lu hua 2013-01-17 02:51:51 UTC
System Environment:
--------------------------
Arch:           x86_64
Platform:       Ivybridge
Libdrm:		(master)libdrm-2.4.40-13-g9e6f96a579fc2ed241e9a31a35a5995129ee8f7a
Mesa:           (master)56c01d81094795286828ecb83713e043695e905a 
Xserver:(master)xorg-server-1.13.99.901-2-g6703a7c7cf1a349c137e247a0c8eb462ff7b07be
Xf86_video_intel: (master)2.20.17-88-g2113f7f440dd2f10e80f0bb3bd5cd155f7e19098
Cairo:	(master)1dfea39841fc6d545e45420b1999239f29556c05
Libva:	(staging)21649988d6b532cc96f633db017d1e4369f640e9
Libva_intel_driver:(staging)788e99361208127763fdf1e146e63fca03a09f67
Kernel:	(drm-intel-nightly) 644e43935a4b9a61460fa4bf449b79032556fb90

Bug detailed description:
-------------------------
It fails on pineview, ironlake, sandybridge, ivybridge and haswell with mesa master branch. It works well on mesa 9.0 branch.

Oglc case depth-stencil(negative.packed_float_invalid_enum) and depth-stencil(negative.packed_invalid_enum) also fail and have same bisect commit.

Bisect shows: 2906e2034c9d674601960a5b586b6e986e6ef04f is the first bad commit.
commit 2906e2034c9d674601960a5b586b6e986e6ef04f
Author:     Matt Turner <mattst88@gmail.com>
AuthorDate: Fri Nov 30 15:07:18 2012 -0800
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Tue Jan 15 13:34:00 2013 -0800

    mesa: Return INVALID_OPERATION when type is known but not allowed

    INVALID_ENUM is for when the type is simply not known.

    Fixes part of es3conform's packed_depth_stencil_error test.
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

output:
----------------------------------------------------------------------
Test the GL_EXT_packed_depth_stencil extension.

depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencil:  PASS rgb8, db, win+pmap, id 152
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencil:  PASS rgb8, win+pmap, id 153
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencil:  PASS rgba8, db, win+pmap, id 156
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencil:  PASS rgba8, win+pmap, id 157
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencil:  PASS rgb8, db, win+pmap, id 166
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencil:  PASS rgb8, win+pmap, id 167
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencil:  PASS rgba8, db, win+pmap, id 170
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencil:  PASS rgba8, win+pmap, id 171
        glReadPixels GL_DEPTH_STENCIL rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLuint rate: 0.00 MBytes per second.
        glReadPixels GL_DEPTH/GLushort rate: 0.00 MBytes per second.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.
depthStencilFAIL
        glDrawPixels(GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT) failed to generate GL_INVALID_ENUM.


Reproduce steps:
----------------
1. xinit
2. ./bin/glean -o -v -v -v -t +depthStencil
Comment 1 Matt Turner 2013-01-23 07:18:28 UTC
*** Bug 59746 has been marked as a duplicate of this bug. ***
Comment 2 Matt Turner 2013-01-30 00:03:55 UTC
Reverting the patch doesn't regress the ES3 conformance test that the commit message says it fixes, but it also doesn't fix this glean test.

I'm guessing one of Jordan's later patches had the same effect as this one.
Comment 3 Matt Turner 2013-01-30 00:36:53 UTC
(In reply to comment #2)
> Reverting the patch doesn't regress the ES3 conformance test that the commit
> message says it fixes, but it also doesn't fix this glean test.

Whoops, nope. I'm wrong. Reverting my patch fixes the glean depth stencil test and doesn't affect anything in es3conform.

> I'm guessing one of Jordan's later patches had the same effect as this one.

It apparently did, without adverse side-effects.

Patch sent to the list.
Comment 5 lu hua 2013-02-01 05:10:45 UTC
Verified. Fixed by commit a527b2192e3cb4a68af927ab405e38181d2fcf75.
commit a527b2192e3cb4a68af927ab405e38181d2fcf75
Author: Matt Turner 
Date: Tue Jan 29 16:35:30 2013 -0800

Revert "mesa: Return INVALID_OPERATION when type is known but not allowed"

This reverts commit 2906e2034c9d674601960a5b586b6e986e6ef04f.

Fixes a regression in the glean depthStencil test.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.