[Mesa-dev] [PATCH 1/2] i965/Gen6: Work around GPU hangs due to misaligned depth coordinate offsets.

Kenneth Graunke kenneth at whitecape.org
Thu May 3 11:01:27 PDT 2012


On 04/26/2012 06:54 AM, Paul Berry wrote:
> In i965 Gen6, Mesa has for a long time used the "depth coordinate
> offset X/Y" settings (in 3DSTATE_DEPTH_BUFFER) to cause the GPU to
> render to miplevels other than 0.  Unfortunately, this doesn't work,
> because these offsets must be aligned to multiples of 8, and miplevels
> in the depth buffer are only guaranteed to be aligned to multiples of
> 4.  When the offsets aren't aligned to a multiple of 8, the GPU
> sometimes hangs.
>
> As a temporary measure, to avoid GPU hangs, this patch smashes the 3
> LSB's of "depth coordinate offset X/Y" to 0.  This results in
> incorrect rendering to mipmapped depth textures, but that seems like a
> reasonable stopgap while we figure out a better solution.
>
> (Note that we have only ever observed this GPU hang on Gen6 when HiZ
> is enabled, so another possible stopgap would be to disable HiZ).
>
> Avoids GPU hangs in piglit test "depthstencil-render-miplevels" at
> texture sizes that are not powers of 2.

For both patches:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

I think we should punt on a real solution for now: it should only show 
up if someone uses a depth buffer that's non-power-of-two sized 
(uncommon) -and- mipmapped (doubly uncommon)...and working around this 
is probably going to be a royal pain.


More information about the mesa-dev mailing list