On 6 August 2012 21:20, Kenneth Graunke <kenn...@whitecape.org> wrote:
> 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. > Ok, cool. Thanks for the confirmation that this is a good idea. I hate doing cherry-picks to stable that have merge conflicts anyhow, and in this case the fact that it would cause known regressions made it seem even less certain--but I couldn't think of a better alternative. I'll plan on pushing it to stable tomorrow. > > 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? > Yes, I tested it on both Sandy Bridge and Ivy Bridge. (Believe it or not, I brought both with me to SIGGRAPH :))
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev