Bug 44103 - Nothing works with non-HiZ DDX
Summary: Nothing works with non-HiZ DDX
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All All
: medium critical
Assignee: Chad Versace
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-23 13:03 UTC by Ian Romanick
Modified: 2012-01-16 16:41 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Potential fix (2.22 KB, patch)
2011-12-27 10:58 UTC, Chad Versace
Details | Splinter Review

Description Ian Romanick 2011-12-23 13:03:45 UTC
If you are unfortunate enough to be running a non-HiZ DDX (e.g., xorg-x11-drv-intel-2.15.0-5.fc15.x86_64), every program that uses GL will fail with:

brw_misc_state.c:355: emit_depthbuffer: Assertion `!separate_stencil || hiz_region' failed.

Setting the environment variable INTEL_HIZ=0 works around the issue.

I bisected this to:

commit 0b8b6c7e974930daf12e97fb8f0b2a2cc29396d9
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Dec 7 15:02:02 2011 -0800

    intel: Stop creating the wrapped stencil irb.
    
    There were only two places it was really used at this point, which was
    in the batchbuffer emit of the separate stencil packets for gen6/7.
    Just write in the ->stencil_mt reference in those two places and ditch
    all this flailing around with allocation and refcounts.
    
    v2: Fix separate stencil on gen7.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 1 Ian Romanick 2011-12-23 17:45:44 UTC
Even with the work-around, some tests, such as hiz-depth-read-fbo-d24-s8, still hit the assertion.
Comment 2 Chad Versace 2011-12-27 10:58:33 UTC
Created attachment 54864 [details] [review]
Potential fix

Ian, could you try this patch?

I would test it myself, but my test system is down for the day.
Comment 3 Ian Romanick 2012-01-02 20:14:56 UTC
(In reply to comment #2)
> Created attachment 54864 [details] [review] [review]
> Potential fix
> 
> Ian, could you try this patch?
> 
> I would test it myself, but my test system is down for the day.

That fixes all of the assertion failures, but there are still some ES2 conformance tests that fail:

depth_texture
packed_depth_stencil
framebuffer_objects

All three pass with the INTEL_HIZ=0 override.
Comment 4 Ian Romanick 2012-01-13 16:22:00 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Created attachment 54864 [details] [review] [review] [review]
> > Potential fix
> > 
> > Ian, could you try this patch?
> > 
> > I would test it myself, but my test system is down for the day.
> 
> That fixes all of the assertion failures, but there are still some ES2
> conformance tests that fail:
> 
> depth_texture
> packed_depth_stencil
> framebuffer_objects
> 
> All three pass with the INTEL_HIZ=0 override.

Adding Neil's patch (9462b84 on Mesa master) fixes all of the regressions.
Comment 5 Chad Versace 2012-01-13 17:00:42 UTC
The patch is posted to mesa-dev.

http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg17156.html

Once it's commited, I'll mark this as resolved.
Comment 6 Chad Versace 2012-01-16 16:41:17 UTC
Marking RESOLVED/FIXED.

Fixed by:

commit 7e08bf08d13228001f6306800b5bd69b89b1bb6f
Author: Chad Versace <chad.versace@linux.intel.com>
Date:   Tue Dec 27 10:52:44 2011 -0800

    i965: Fix gen6,gen7 when used with a non-HiZ capable DDX


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.