[Mesa-dev] [PATCH 0/2] i965: Back-port GPU hang workarounds (bug 50271)

Kenneth Graunke kenneth at whitecape.org
Mon Aug 6 21:20:36 PDT 2012


On 08/05/2012 08:36 AM, Paul Berry wrote:
> Just looking for a quick patch review to make sure I've backported
> these patches to 8.0 correctly (and also confirmation that this
> backport is a good idea).  These patches are intended to apply to the
> 8.0 branch.
> 
> The issue is that on Gen6 and Gen7, images rendered to depth and
> stencil buffers must be aligned to a multiple of 8 pixels, otherwise
> certain rendering operations produce a GPU hang.  Unfortunately, due
> to the layout of miptrees (and the fact that we render to depth and
> stencil miptrees using coordinate offsets), it would take a lot of
> code rework to both produce correct rendering and guarantee no GPU
> hangs.
> 
> These patches avoid the GPU hangs by forcing the image offsets to be
> multiples of 8.  As a result, correct rendering to depth and stencil
> miptrees is sacrificed but the GPU doesn't hang.  The sacrifice is
> minor, since it only affects miptree levels that would otherwise be
> unaligned (in practice this is usually just the smallest miplevels),
> and it only matters for (a) rendering to a depth/stencil buffer that
> is later used as a texture, or (b) ping-ponging between miplevels
> while rendering, both of which are fairly rare.  On the master branch,
> we decided that this was a worthwhile compromise.
> 
> As a result of this sacrifice, this will regress the following piglit
> tests: fbo/fbo-depth-array (Gen6 only),
> spec/ARB_depth_buffer_float/fbo-clear-formats,
> spec/ARB_depth_texture/fbo-clear-formats, and
> spec/EXT_packed_depth_stencil/fbo-clear-formats.  These tests
> currently fail on master for the same reason.
> 
> For more information see:
> https://bugs.freedesktop.org/show_bug.cgi?id=50271
> 
> [PATCH 1/2] i965/Gen6: Work around GPU hangs due to misaligned depth coordinate offsets.
> [PATCH 2/2] i965/Gen7: Work around GPU hangs due to misaligned depth coordinate offsets.

This trade-off makes sense to me.  Take small amounts of misrendering in
a few piglit tests doing non-real-world cases but avoid nasty GPU hangs.
 I hate to regress Piglit tests on stable, but it's for the best.

For some reason, I thought this needed the more invasive
coarse/fine-grained tile offset patches.

Have you tested this to confirm it fixes the cases?


More information about the mesa-dev mailing list