Bug 74066 - [IVB/HSW/BYT-M bisected]GLBenchmark crashes
Summary: [IVB/HSW/BYT-M bisected]GLBenchmark crashes
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: Matt Turner
QA Contact: Intel 3D Bugs Mailing List
URL: http://patchwork.freedesktop.org/patc...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-26 06:20 UTC by zhoujian
Modified: 2014-02-13 00:14 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg.log (138 bytes, text/plain)
2014-01-26 06:22 UTC, zhoujian
Details
Xorg.0.log (23.26 KB, text/plain)
2014-01-26 06:23 UTC, zhoujian
Details
outfile.log (16.00 KB, text/plain)
2014-01-26 06:23 UTC, zhoujian
Details

Description zhoujian 2014-01-26 06:20:23 UTC
Platform: BYT/IVB/HSW
Libdrm:(master)libdrm-2.4.52
Mesa:(master)00c672086c31f94dd96609fa976300781f53792e
Xserver:(master)xorg-server-1.15.0-558-gc1ce807d9f18f215332d7eeb84
Xf86_video_intel:(master)2.99.907-52-gc9e9c85fc7b21e231c2532fe1c75
Cairo:(master)2a7f133639bed86a29dd9693cb78c0aa42eaff30
Libva:(staging)79ddde6bab54618046f136471c020c08ff4fde50
Libva_intel_driver:(staging)6736a39fce442a8e5abb2a2e99adf56e3965d35f
Kernel: git-42a4af

Bug detailed description:
-----------------------------------------------------------------------
GLBenchmark crashes on BYT/IVB/HSW, The problem exists on both gnome-session and Raw X.Please see dmesg.log, Xorg.o.log and outfile.log.
It’s Mesa regression, bisecting show that the first bad commit is
b2d1c579bb84a88179072a6a783f8827e218db55 
Author: Matt Turner <mattst88@gmail.com> 
Date: Fri Jan 17 14:22:49 2014 -0800 
    glcpp: Set extension defines after resolving the GLSL version. 
    Instead of defining preprocessor macros in glcpp_parser_create based on the GL API, wait until the shader version has been resolved. Doing this allows us to correctly set (and not set) preprocessor macros for extensions allowed by the API but not the shader, as in the case of ARB_ES3_compatibility. 
    The shader version has been resolved when the preprocessor encounters the first preprocessor token, since the GLSL spec says "The #version directive must occur in a shader before anything else,except for comments and white space."Specifically, if a #version token is found the version is known explicitly, and if any other preprocessor token is found then the GLSL version is implicitly 1.10. 
    Cc: mesa-stable@lists.freedesktop.org 
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71630 
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> 

Performance
-------------------------------------------------------------
Test glbenchmark2.5.1 on HSW.
git -b2d1c57  --bad
git -c907595  --good

Reproduce steps:
----------------------------------------------------------------
1, xinit
2, vblank_mode=0 ./GLBenchmark2.x86_64 -data ../../data/ -w 1920 -h 1080 -t 2000000
Comment 1 zhoujian 2014-01-26 06:22:20 UTC
Created attachment 92797 [details]
dmesg.log
Comment 2 zhoujian 2014-01-26 06:23:02 UTC
Created attachment 92798 [details]
Xorg.0.log
Comment 3 zhoujian 2014-01-26 06:23:24 UTC
Created attachment 92799 [details]
outfile.log
Comment 4 Ian Romanick 2014-01-26 17:05:29 UTC
I think Matt may already have a patch on the mailing list for this...
Comment 5 Ian Romanick 2014-01-26 17:09:39 UTC
*** Bug 74069 has been marked as a duplicate of this bug. ***
Comment 6 Matt Turner 2014-01-26 19:25:16 UTC
Thanks for the bug report.

Looks like just a misunderstanding on my part of the GLSL ES spec. (My outstanding patch shouldn't affect this bug)

After stating

> Each compilation unit should declare the version of the language it is written 
> to using the #version directive:
>     #version number

the GLSL ES 1.0 spec continues

> "Version 100 of the language does not require compilation units to include this 
> directive, and compilation units that do not include a #version directive will 
> be treated as targeting version 100."

Spec authors should not use "should"!

I don't see how this worked before my commit either, unless by setting language_version = 110 we coincidentally passed some (version >= 100) checks?
Comment 7 Matt Turner 2014-01-27 02:16:45 UTC
Patch on the list.
Comment 8 zhoujian 2014-01-27 02:59:45 UTC
With patch http://patchwork.freedesktop.org/patch/18801/ test that problem still being.
Comment 9 Matt Turner 2014-01-27 03:20:39 UTC
(In reply to comment #8)
> With patch http://patchwork.freedesktop.org/patch/18801/ test that problem
> still being.

Are you sure you were testing the patched Mesa? I haven't tested GLB2.5, but I was able to reproduce the problem with GLB2.7 before my patch. After applying the patch I cannot reproduce the problem.
Comment 10 zhoujian 2014-01-27 04:17:15 UTC
sorry,I missed something with your patch. 
Retest it, problem is fixed.
Comment 11 U. Artie Eoff 2014-01-27 20:54:43 UTC
Commit b2d1c579bb84a88179072a6a783f8827e218db55 also broke Weston w/cairo-glesv2 and causes the following errors from cairo-gl-shaders:

OpenGL shader compilation failed.  Shader:
#ifdef GL_ES
precision mediump float;
#endif
uniform vec4 color;
void main()
{
	gl_FragColor = color;
}

OpenGL compilation log:
0:4(14): error: no precision specified this scope for type `vec4'

weston-desktop-shell: cairo-gl-shaders.c:761: compile_shader: Assertion `!"reached"' failed.



I tested the patch at http://patchwork.freedesktop.org/patch/18801/ and it fixes things for me.
Comment 13 zhoujian 2014-02-11 05:46:37 UTC
Verified it.


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.