Bug 90751

Summary: [BDW Bisected]dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.stencil_index8 fails
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: high CC: idr, kenneth
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description lu hua 2015-05-29 07:47:07 UTC
System Environment:
--------------------------
Platform: BDW
Libdrm:		(master)libdrm-2.4.61-4-gfde4969176822fe54197b6baa78f8b0ef900baba
Mesa:		(master)10aacf5ae8f3e90e2f0967fbdcf96df93e346e20
Xserver:	(master)xorg-server-1.17.0-157-gcbb7eb73b5399e31a7afb800363504d539df0ecf
Xf86_video_intel:(master)2.99.917-313-gfb1643f0f904eb258da71cd0b8deb8d3ec6dafed
Libva:		(master)4763db1c2133d4e6b92355938ecb6f23a7767b6b
Libva_intel_driver:(master)4a1c4d21f3428b08ef765d7f7de75b97006514ac
Kernel:   (drm-intel-nightly)f9d865e87168eaba908020942f458c40facd6060

Bug detailed description:
-----------------------------
It fails on BDW with Mesa master branch.

Bisect shows:7cc3bb2318aa22ba1e85505ff50706bdacdbbf92 is the first bad commit.
commit 7cc3bb2318aa22ba1e85505ff50706bdacdbbf92
Author:     Jason Ekstrand <jason.ekstrand@intel.com>
AuthorDate: Fri Jan 30 14:24:13 2015 -0800
Commit:     Jason Ekstrand <jason.ekstrand@intel.com>
CommitDate: Fri Jan 30 15:49:45 2015 -0800

    main: Add STENCIL_INDEX formats to base_tex_format

    This fixes a bug on BDW when our meta-based stencil blit path assert-fails
    due to an invalid internal format even though we do support the
    ARB_stencil_texturing extension.

    Reviewed-by: Matt Turner <mattst88@gmail.com>

output:
dEQP Core 2014.x (0xcafebabe) starting..
  target implementation = 'X11 EGL/GLX'

Test case 'dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.stencil_index8'..
Mesa 10.7.0-devel implementation error: unexpected format GL_STENCIL_INDEX8 in _mesa_choose_tex_format()
Please report at https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
  Fail (Framebuffer checked as incomplete, but with wrong status)
Test case duration in microseconds = 4709 us

DONE!

Test run totals:
  Passed:        0/1 (0.0%)
  Failed:        1/1 (100.0%)
  Not supported: 0/1 (0.0%)
  Warnings:      0/1 (0.0%)

Reproduce steps:
---------------------------- 
1. xinit
2. ./deqp-gles3 --deqp-gl-context-type=egl --deqp-case="dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.stencil_index8"
Comment 1 Gavin Hindman 2015-06-06 01:21:36 UTC
What's the status on this issue?  We are rapidly running out of time to get a Mesa update pushed to Chrome.
Comment 2 Kenneth Graunke 2015-06-08 22:48:29 UTC
Fixed on master with:

commit f7aad9da20b13c98f77d6a690b327716f39c0a47
Author: Dave Airlie <airlied@gmail.com>
Date:   Sun Apr 5 16:48:47 2015 +1000

    mesa/teximage: use correct extension for accept stencil texture.
    
    This was using the wrong extension, ARB_stencil_texturing
    doesn't mention any changes in this area.
    
    Fixes "dEQP-GLES3.functional.fbo.completeness.renderable.texture.
    stencil.stencil_index8."
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90751
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 3 Kenneth Graunke 2015-06-09 21:48:52 UTC
I made a mistake, and that patch regressed a ton of tests on Broadwell.

I have a new +2 line patch which should fix those regressions.
Comment 4 Kenneth Graunke 2015-06-09 22:19:38 UTC
Patch to fix the regressions on the mailing list:
http://lists.freedesktop.org/archives/mesa-dev/2015-June/086127.html
Comment 5 Kenneth Graunke 2015-06-13 18:38:49 UTC
Oh, those got fixed a while ago too, by:

commit f83b9e58f6e8a748def367c7d523eb7285b1aeb7
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Jun 9 14:33:47 2015 -0700

    i965: Momentarily pretend to support ARB_texture_stencil8 for blits.

So we should be all good here.
Comment 6 shuo.wang 2015-06-15 03:18:58 UTC
Verified and fixed by Mesa 4d35eef326e49cc8da50879d30a1c5088d4775e1 and kernel 4.1.0-rc7_drm-intel-nightly_4643c5_20150613+.
Thanks
Comment 7 Brian Wilson 2015-06-25 18:28:36 UTC
This is still reproduceable for us on ChromeOS. 

We added "i965: Momentarily pretend to support ARB_texture_stencil8 for blits." patch but the test "dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.stencil_index8" still fails on BDW and BSW.

Mesa used:
c2a0600d5b0645533ba442b5ab879b23c2564a4d: "i965: Don't set NirOptions for stages that will use the vec4 backend."

Plus patches:
- 10.6-i965-do-not-round-line-width-when-multisampling-or-a.patch
- 10.6-mesa-add-GL_RED-GL_RG-support-for-floating-point-tex.patch
- 10.6-i965-Momentarily-pretend-to-support-ARB_texture_sten.patch
- 10.6-Revert-i965-Advertise-a-line-width-of-40.0-on-Cherry.patch
Comment 8 Ian Romanick 2015-06-25 19:15:29 UTC
(In reply to Brian Wilson from comment #7)
> This is still reproduceable for us on ChromeOS. 
> 
> We added "i965: Momentarily pretend to support ARB_texture_stencil8 for
> blits." patch but the test
> "dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.
> stencil_index8" still fails on BDW and BSW.
> 
> Mesa used:
> c2a0600d5b0645533ba442b5ab879b23c2564a4d: "i965: Don't set NirOptions for
> stages that will use the vec4 backend."
> 
> Plus patches:
> - 10.6-i965-do-not-round-line-width-when-multisampling-or-a.patch
> - 10.6-mesa-add-GL_RED-GL_RG-support-for-floating-point-tex.patch
> - 10.6-i965-Momentarily-pretend-to-support-ARB_texture_sten.patch
> - 10.6-Revert-i965-Advertise-a-line-width-of-40.0-on-Cherry.patch

Do you also have f7aad9d?
Comment 9 Brian Wilson 2015-06-25 21:10:22 UTC
Just talked with the integrators and it looks like we might be unclear on the required patches for this.

Is this the only required patch for this?:
f83b9e58f6e8a748def367c7d523eb7285b1aeb7: i965: Momentarily pretend to support ARB_texture_stencil8 for blits.

Or is it: 
f7aad9da20b13c98f77d6a690b327716f39c0a47: mesa/teximage: use correct extension for accept stencil texture.

*and* f83b9e58f6e8a748def367c7d523eb7285b1aeb7

We only integrated f83b9e58f6e8a748def367c7d523eb7285b1aeb7 in our patchset.

Thanks for the clarification.
Comment 10 Kenneth Graunke 2015-06-25 22:55:28 UTC
f7aad9da20b13c98f77d6a690b327716f39c0a47: mesa/teximage: use correct extension
for accept stencil texture.

is the commit that fixes this bug.  It also regressed a ton of tests on Broadwell, due to a mistake I made.

f83b9e58f6e8a748def367c7d523eb7285b1aeb7: i965: Momentarily pretend to support
ARB_texture_stencil8 for blits.

fixes those regressions.

You really want both commits.
Comment 11 Ian Romanick 2015-10-22 20:09:11 UTC
Closing as fixed.  Please re-open if you still encounter the problem in released versions.

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.