Bug 83081

Summary: [BDW Bisected]Piglit spec_ARB_sample_shading_builtin-gl-sample-mask_2 is core dumped
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: VERIFIED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: high CC: krh
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description lu hua 2014-08-26 05:47:10 UTC
System Environment:
--------------------------
Platform: bdw
Libdrm:		(master)libdrm-2.4.56-10-g22b995d8cbf1059535c5de5ba1869c1623ae5b08
Mesa:		(master)306e421887720b149be77c749108bcffcebe34f6
Xserver:	(master)xorg-server-1.15.99.902-121-g2f5cf9ff9a0f713b7e038636484c77f113a5f10a
Xf86_video_intel:(master)2.99.914-68-gd209b03915e4d12ce445d72ac09bb4fe664ba664
Libva:		(master)acfcd5f0637a951d50c5112c7dfbd46f1d0dcdb3
Libva_intel_driver:(master)f3f49f2f0e6b3669d9b09341a11cf0b96e138674
Kernel:   (drm-intel-nightly)257d90d13794c2eb545ab0d6c708f21e2a0378b6

ug detailed description:
---------------------------
It fails on BDW with mesa master branch, works well on Mesa 10.3 branch.

The latest known bad commit 306e421887720b149be77c749108bcffcebe34f6
The latest known good commit f80c6847e969016596b5ce3202236c15663cc61a
(It has bug 82929, bisect is slow)

output:
FBO attachment = TEXTURE, result = pass
Floating point exception (core dumped)

(gdb) bt
#0  0x00007ffff3d53344 in get_fast_clear_rect (irb=<optimized out>, rect=0x7fffffffdf50, fb=0x84c330, brw=0x7ffff39d7038) at brw_meta_fast_clear.c:310
#1  brw_meta_fast_clear (brw=brw@entry=0x7ffff39d7038, fb=fb@entry=0x84c330, buffers=buffers@entry=256, partial_clear=partial_clear@entry=false) at brw_meta_fast_clear.c:512
#2  0x00007ffff3d0dc00 in brw_clear (ctx=0x7ffff39d7038, mask=256) at brw_clear.c:246
#3  0x000000000040185f in test_builtin_sample_mask (ms_fbo=...) at /GFX/Test/Piglit/piglit/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp:191
#4  0x0000000000401ad7 in piglit_display () at /GFX/Test/Piglit/piglit/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp:228
#5  0x00007ffff7d84baa in run_test (gl_fw=0x604010, argc=2, argv=0x7fffffffe288) at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl/piglit_winsys_framework.c:78
#6  0x00007ffff7d6a205 in piglit_gl_test_run (argc=2, argv=0x7fffffffe288, config=0x7fffffffe150) at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl.c:151
#7  0x00000000004014cd in main (argc=2, argv=0x7fffffffe288) at /GFX/Test/Piglit/piglit/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp:44

Reproduce steps:
---------------------------- 
1. xinit
2. bin/arb_sample_shading-builtin-gl-sample-mask 2 -auto
Comment 1 lu hua 2014-08-26 06:30:58 UTC
Bisect shows: 2f28a0dc23165123cf1e8b5942acad37878edd8a is the first bad commit
commit 2f28a0dc23165123cf1e8b5942acad37878edd8a
Author:     Kristian Høgsberg <krh@bitplanet.net>
AuthorDate: Mon Jul 7 16:44:58 2014 -0700
Commit:     Kristian Høgsberg <krh@bitplanet.net>
CommitDate: Fri Aug 15 11:25:47 2014 -0700

    i965: Implement fast color clears using meta operations

    This patch uses the infrastructure put in place by previous patches
    to implement fast color clears and replicated color clears in terms of
    meta operations.

    This works all the way back to gen7 where fast clear was introduced and
    adds support for fast clear on gen8.  It replaces the blorp path
    completely and improves on a few cases.  Layered clears are now done
    using instanced rendering and multiple render-target clears use a
    MRT shader with rep16 writes.

    Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
    Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 2 lu hua 2014-08-26 06:42:34 UTC
*** Bug 83082 has been marked as a duplicate of this bug. ***
Comment 3 lu hua 2014-08-26 06:43:21 UTC
*** Bug 83083 has been marked as a duplicate of this bug. ***
Comment 4 lu hua 2014-08-27 01:36:50 UTC
It also happens on 10.3 branch.
Comment 5 Kenneth Graunke 2014-08-30 06:57:17 UTC
Patch on mailing list:
http://lists.freedesktop.org/archives/mesa-dev/2014-August/066917.html
Comment 6 Kenneth Graunke 2014-08-31 08:47:05 UTC
Fixed by:

commit e34a363a781a24b2cf6930c4d37f781ffec8a19a
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Aug 29 15:15:43 2014 -0700

    i965: Add 2x MSAA support to Broadwell fast clear code.
    
    According to the cited documentation section (but in the newer docs),
    x_scaledown is the same for 2x and 4x MSAA.
    
    +47 piglits.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83081
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Cc: "10.3" <mesa-stable@lists.freedesktop.org>
Comment 7 lu hua 2014-09-01 01:54:17 UTC
Fixed on master branch.
Comment 8 Ian Romanick 2014-09-09 23:54:48 UTC
And this has been picked to the 10.3 branch:

commit 8ef3d4fe03de1b370e255a3c900719a8cce59599
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Aug 29 15:15:43 2014 -0700

    i965: Add 2x MSAA support to Broadwell fast clear code.
    
    According to the cited documentation section (but in the newer docs),
    x_scaledown is the same for 2x and 4x MSAA.
    
    +47 piglits.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83081
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Cc: "10.3" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit e34a363a781a24b2cf6930c4d37f781ffec8a19a)

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.