Bug 68637

Summary: [Bisected IVB/HSW]Unigine demo crash
Product: Mesa Reporter: meng <mengmeng.meng>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: high CC: idr, kenneth
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Xorg.0.log

Description meng 2013-08-28 06:13:56 UTC
Created attachment 84769 [details]
Xorg.0.log

System Environment:       
----------------------------------------------
Platform: IVB/HSW
Libdrm:	(master)libdrm-2.4.46-26-g3c967e715528ee52195c178c4d09d03b643f0c06
Mesa:   (master)d8ac987f6ab228df1a478b36c3d889992754374f
Xserver:(master)xorg-server-1.14.99.1-187-ge01a3f65d3e6d92f92ef2992
Xf86_video_intel:(master)2.21.15-15-g6997c4c2bde319fdf73ead8a9c9965f6548545eb
Kernel:	(drm-intel-nightly) git-aaf099

Bug detailed description:
----------------------------------------------
Unigine demo crash on IVB/HSW. The problem doesn’t on SNB.
Please see Xog.0.log attached.
It’s mesa regression, bisecting show the first bad commit:
commit 528d70d0b5fd2722bc32d42d8859865081cf0730
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Wed Aug 21 16:01:45 2013 -0700

i965/vs: Use a fixed set of register classes.

Output when unigine demo crash
------------------------------
Unigine fatal error
Engine::init(): clear video settings for "Mesa DRI Intel(R) Ivybridge Desktop x86/MMX/SSE2 3.0 Mesa 9.3.0-devel (git-528d70d)"
GLRender::GLRender(): Unknown GPU
Received invalid memory reference signal
Shutdown

Reproduce steps:
---------------------------------------------
1. xinit&
2.
export LD_LIBRARY_PATH=bin/:$LD_LIBRARY_PATH
export force_glsl_extensions_warn=true
vblank_mode=0 ./bin/Sanctuary -video_app opengl -data_path ../ -sound_app null -system_script sanctuary/unigine.cpp -engine_config ../data/unigine.cfg -video_mode -1 -video_fullscreen 1 -extern_define PHORONIX -video_width 800 -video_height 600
Comment 1 Kenneth Graunke 2013-08-28 18:47:54 UTC
Turns out this was an existing bug uncovered by the bisected patch.

Fixed by:
http://lists.freedesktop.org/archives/mesa-dev/2013-August/044039.html
Comment 2 meng 2013-08-29 01:16:55 UTC
(In reply to comment #1)
> Turns out this was an existing bug uncovered by the bisected patch.

Fixed
> by:
http://lists.freedesktop.org/archives/mesa-dev/2013-August/044039.html

Fixed it with the patch.
Comment 3 Kenneth Graunke 2013-08-30 04:46:09 UTC
Pushed to master as:

commit 037f2ca607e11e62501516e4d38d90f1b2ce29ce
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Wed Aug 28 11:16:27 2013 -0700

    i965/vs: Detect GRF sources in split_virtual_grfs send-from-GRF code.
    
    It is incorrect to assume that src[0] of a SEND-from-GRF opcode is the GRF.
    VS_OPCODE_PULL_CONSTANT_LOAD_GEN7 uses an IMM as src[0], and stores the
    GRF as src[1].
    
    To be safe, loop over all the source registers and mark any GRFs.  We
    probably won't ever have more than one, but it's simpler to just check
    all three rather than attempting to bail early.
    
    Fixes assertion failures in Unigine Sanctuary since we started making
    register allocation rely on split_virtual_grfs working.  (The register
    classes were actually sufficient, we were just interpreting an IMM as
    a virtual GRF number.)
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68637
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Cc: mesa-stable@lists.freedesktop.org

Thanks for the report.
Comment 4 meng 2013-08-30 07:20:58 UTC
Verified.

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.