Bug 43328 - [bisected SNB]piglit fbo/fbo-mipmap-copypix and fbo/fbo-blending-formats regresses
Summary: [bisected SNB]piglit fbo/fbo-mipmap-copypix and fbo/fbo-blending-formats regr...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 42993
  Show dependency treegraph
 
Reported: 2011-11-29 02:02 UTC by fangxun
Modified: 2012-02-23 06:57 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description fangxun 2011-11-29 02:02:48 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       huronriver
Libdrm:         (master)2.4.27-2-gca4971292cf99e0063416cd1c3467af94637bf2b
Mesa:           (master)d4fcf67a3ac78c29448000486dadc2b4b1b2a56d
Xserver:      
(master)xorg-server-1.11.99.1-43-gb2015a2c01711646bb7ae23d684abee0cd55d4d0
Xf86_video_intel: (master)2.17.0-26-g16f5e224dcfd97012b38ee1af6c72dbe3c0f3304
Kernel:  (drm-intel-next)9a10f401a401ca69c6537641c8fc0d6b57b5aee8


Bug detailed description:
------------------------- 
Piglit fbo/fbo-mipmap-copypix segfaults, fbo/fbo-blending-formats fails on SandyBrideg. Bisect shows f8b13ba1374bd4369ad85f7f2becec375f0b66ad is the first bad commit.
commit f8b13ba1374bd4369ad85f7f2becec375f0b66ad
Author:     Eric Anholt <eric@anholt.net>
AuthorDate: Tue Nov 15 16:53:48 2011 -0800
Commit:     Eric Anholt <eric@anholt.net>
CommitDate: Tue Nov 22 13:58:39 2011 -0800

    i965: Add support for ARGB2101010 rendering.

    GL 3.0 specifies GL_RGB10_A2 as a required sized format for rendering
    and texturing.

    This introduces two piglit regressions: one due to fbo-mipmap-copypix
    hitting swrast GetRow (we want to convert swrast to MapRenderbuffer),
    and one due to fbo-blending-formats being too picky while leaving
    dithering on.

    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

(gdb) bt
#0  0x00000000 in ?? ()
#1  0xb79d78e7 in intel_set_span_functions (intel=0x80c35f8, rb=0x86d14a8) at
intel_span.c:455
#2  intel_renderbuffer_map (intel=0x80c35f8, rb=0x86d14a8) at intel_span.c:205
#3  0xb79d7951 in intel_framebuffer_map (intel=0x80c35f8, fb=<value optimized
out>) at intel_span.c:240
#4  0xb79d7b1d in intel_span_map_buffers (ctx=0x80c35f8) at intel_span.c:310
#5  intelSpanRenderStart (ctx=0x80c35f8) at intel_span.c:331
#6  0xb7c38fe4 in swrast_render_start (ctx=0x80c35f8, srcx=0, srcy=0,
width=512, height=512, destx=0, desty=0, type=6144) at swrast/s_context.h:325
#7  _swrast_CopyPixels (ctx=0x80c35f8, srcx=0, srcy=0, width=512, height=512,
destx=0, desty=0, type=6144) at swrast/s_copypix.c:692
#8  0xb7b8dc79 in _mesa_meta_CopyPixels (ctx=0x80c35f8, srcX=0, srcY=0,
width=512, height=512, dstX=0, dstY=0, type=6144) at drivers/common/meta.c:1905
#9  0xb79d8a51 in intelCopyPixels (ctx=0x80c35f8, srcx=0, srcy=0, width=512,
height=512, destx=0, desty=0, type=6144) at intel_pixel_copy.c:224
#10 0xb7bfe074 in _mesa_CopyPixels (srcx=0, srcy=0, width=512, height=512,
type=6144) at main/drawpix.c:208
#11 0x0806bfff in test_mipmap_copypixels ()
#12 0x0806c32b in piglit_display ()
#13 0x0806c993 in display ()
#14 0xb7eec5b6 in ?? () from /usr/lib/libglut.so.3
#15 0xb7ef03f8 in fgEnumWindows () from /usr/lib/libglut.so.3
#16 0xb7eecb13 in glutMainLoopEvent () from /usr/lib/libglut.so.3
#17 0xb7eed395 in glutMainLoop () from /usr/lib/libglut.so.3
#18 0x0806d089 in main ()


Reproduce steps:
----------------
1. start X
2. ./fbo-mipmap-copypix -auto
Comment 1 Ian Romanick 2012-01-17 16:03:07 UTC
With Brian's renderbuffer-cleanups-v2 branch, fbo-mipmap-copypix no longer segfaults.  There is a bug in the test (probing pixels after swapping) that causes some failures, but all of the "With pixel transfer enabled" subtests still fail.

The problem in fbo-mipmap-copypix is fixed by disabling dithering in the test.

Patches to correct both test issues have been sent to the piglit list for review:

http://lists.freedesktop.org/archives/piglit/2012-January/001716.html
http://lists.freedesktop.org/archives/piglit/2012-January/001717.html
Comment 2 Ian Romanick 2012-01-26 18:31:36 UTC
With Brian's work merged to master, I've sent a patch to the mesa-dev list that should fix the last issue with these tests.

http://lists.freedesktop.org/archives/mesa-dev/2012-January/018213.html
Comment 3 Ian Romanick 2012-02-01 10:42:47 UTC
An updated patch has been posted.

http://lists.freedesktop.org/archives/mesa-dev/2012-February/018557.html
Comment 4 Ian Romanick 2012-02-07 17:15:57 UTC
Fixed on 8.0 branch by:

commit 74a5f030664a9509664c91346f2cde7ed06cd3c9
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Wed Feb 1 11:37:54 2012 -0700

    intel: Remove num_mapped_regions assertion from _intel_batchbuffer_flush
    
    There are cases where a buffer can be mapped while another buffer is
    flushed.  This can happen in the CopyPixels meta-op path for piglit's
    fbo-mipmap-copypix.  After some discussion with Eric, it seems this
    assertion is no longer necessary, and it has always been too strict.
    
    NOTE: This is a candidate for the 8.0 branch.
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43328
    Cc: Eric Anholt <eric@anholt.net>
    Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
    (cherry picked from commit 65b096aeddd9b45ca038f44cc9adfff86c8c48b2)
Comment 5 fangxun 2012-02-09 01:46:52 UTC
Verified with mesa master(15986d21eb) and 8.0 branch(7f5d3f7ed2a).
NOTE: piglit fbo/fbo-mipmap-copypix segfaults again at current Mesa tip commit.
See Bug 45818.
Comment 6 collette 2012-02-23 06:57:57 UTC
*** Bug 46286 has been marked as a duplicate of this bug. ***


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.