System Environment: -------------------------- Arch: i386 Platform: Sandybridge Libdrm: (master)2.4.33-20-gd72a44c7c4f5eea9c1e5bb0c36cb9e0224b9ca22 Mesa: (master)d6aa7cd7f82a3695243e1ecb1c73cdb796b12523 Xf86_video_intel:(master)2.19.0-25-g4ba366ead3a133136554579fe9a604da1fc1da68 Libva: (vaapi-ext)f12f80371fb534e6bbf248586b3c17c298a31f4e Libva_intel_driver:(vaapi-ext)82fa52510a37ab645daaa3bb7091ff5096a20d0b Kernel: (drm-intel-next-queued) b615b57a124a4af7b68196bc2fb8acc236041fa2 Bug detailed description: ----------------------------- It fails on sandybridge, ivybridge and ironlake with mesa master branch.It doesn't happen on mesa 8.0 branch. Following cases also fail with the same commit: spec_ARB_depth_buffer_float_fbo-clear-formats spec_ARB_depth_texture_fbo-clear-formats spec_EXT_packed_depth_stencil_fbo-clear-formats Bisect shows a683012a80a3408b3b71f22b2a97d9eaaac11a46 is the first bad commit commit a683012a80a3408b3b71f22b2a97d9eaaac11a46 Author: Paul Berry <stereotype441@gmail.com> AuthorDate: Thu Apr 26 06:35:56 2012 -0700 Commit: Paul Berry <stereotype441@gmail.com> CommitDate: Mon May 7 10:50:04 2012 -0700 i965/Gen6: Work around GPU hangs due to misaligned depth coordinate offsets. 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. Reviewed-by: Chad Verace <chad.versace@linux.intel.com> Reproduce steps: ---------------------------- 1. start X 2. ./bin/fbo-depth-array -auto
This was an expected regression. As the commit message indicates, the patch intentionally causes incorrect rendering in order to avoid a GPU hangs (which would be much worse). The test is failing because of the intentional incorrect rendering. The incorrect rendering only happens in a rare use case (mipmapped depth and stencil textures), and it only happens when the texture alignment is poor (which should only happen for non-power-of-two surfaces, and for the tiniest miplevels of a power-of-two surface), so the incorrect rendering is very unlikely to cause actual problems for users. A lot of work would be required to get correct rendering and avoid GPU hangs, so we've decided not to address this bug further unless it causes a problem in a real-world application. Accordingly, I'm adjusting the importance of this bug to low/minor. If we find a real-world application that doesn't render correctly because of this bug, we can escalate.
*** Bug 53522 has been marked as a duplicate of this bug. ***
this is caused by https://bugs.freedesktop.org/show_bug.cgi?id=50271
fbo-depth-array now passes on my IVB system.
Fixed on ivybridge with mesa master branch. It still happens on mesa 9.0 branch. fbo/fbo-depth-array still fails on sandybridge, Ironlake with master branch.. output: [root@x-pk2 bin]# ./fbo-depth-array -auto WARNING: Depth/stencil buffer needs alignment to 8-pixel boundaries. Truncating offset, bad rendering may occur. Probe at (34,27) Expected: 0.200000 0.200000 0.200000 Observed: 0.000000 0.000000 0.000000 Probe at (67,29) Expected: 0.400000 0.400000 0.400000 Observed: 0.000000 0.000000 0.000000 Probe at (100,31) Expected: 0.600000 0.600000 0.600000 Observed: 0.000000 0.000000 0.000000 Probe at (166,27) Expected: 1.000000 1.000000 1.000000 Observed: 0.000000 0.000000 0.000000 PIGLIT: {'result': 'fail' } Following cases fixed on sandybridge, ivybridge and ironlake with mesa master branch: spec_ARB_depth_buffer_float_fbo-clear-formats spec_ARB_depth_texture_fbo-clear-formats spec_EXT_packed_depth_stencil_fbo-clear-formats
Do we have any idea which commit(s) on master fixed the problem? Are these candidates to pick to 9.0?
Fixed on master branch by commit 7139ab80ca9b1b3572ef6da98765ca783e8e5e3b(except fbo/fbo-depth-array). commit 7139ab80ca9b1b3572ef6da98765ca783e8e5e3b Author: Eric Anholt <eric@anholt.net> Date: Wed Aug 8 09:03:26 2012 -0700 i965: Fix rendering to small mipmaps of depth/stencil buffers using a temp mt. Fixes 51 piglit tests (fbo-clear-formats, and most of the remaining failures in depthstencil). fbo/fbo-depth-array fixed on Ivybridge by commit 9f0f2f9512c3c9dcf875efa490b587f010b260c1. commit 9f0f2f9512c3c9dcf875efa490b587f010b260c1 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Jul 2 17:10:09 2012 +0200 mesa: use FLUSH_CURRENT and not FLUSH_VERTICES in _mesa_validate_* ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL calls FLUSH_VERTICES, which is not what we want. This fixes a breakage in classic drivers, introduced in: 62b971673950148eb949ba23d7fdc47debea16f0 vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way around It should fix: https://bugs.freedesktop.org/show_bug.cgi?id=51629 https://bugs.freedesktop.org/show_bug.cgi?id=51642 fbo/fbo-depth-array still fails on sandybridge and ironlake.
No, they're way too invasive.
Still fails on sandybridge and ironlake. output: WARNING: Depth/stencil buffer needs alignment to 8-pixel boundaries. Truncating offset, bad rendering may occur. Probe at (34,1) Expected: 0.200000 0.200000 0.200000 Observed: 0.298039 0.298039 0.298039 Probe at (100,1) Expected: 0.600000 0.600000 0.600000 Observed: 0.098039 0.098039 0.098039 Probe at (166,1) Expected: 1.000000 1.000000 1.000000 Observed: 0.501961 0.501961 0.501961 PIGLIT: {'result': 'fail' }
I can't reproduce it with latest mesa upstream (commit commit 0c0ca557117edd3a57443f4f454c3a8da1d4e0b5)
Make sure to keep intel-3d-bugs@ in the email list.
Test on the latest Mesa master branch, it works well. output: Testing 32x32x6 PIGLIT: {"result": "pass" }
Verified.Fixed.
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.