Bug 34906

Summary: [Pineview] Some WebGL conformance tests will crash firefox
Product: Mesa Reporter: zhao jian <jian.j.zhao>
Component: Drivers/DRI/i915Assignee: Ian Romanick <idr>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: medium CC: idr
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description zhao jian 2011-03-02 01:43:49 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       Pineview 
Libdrm: (master)2.4.23-16-ge6018c25ca63fa6066d8fa6e57373030d07b0392
Mesa: (master)6ddfb322f58c7e00db73e25689ee55ffa1111bd9
Xserver: (master)xorg-server-1.10.0
Xf86_video_intel: (master)2.14.0-31-ge889d3a709b55a0731ab098b17a3364b9bf39387
Cairo: (master)c0dc933efda7672b07e188a1195821340f911a66
Kernel: (drm-intel-next)710f957846cff998c681f3701f6f90eda896458f

Bug detailed description:
-------------------------
There are some cases of WebGL conformance tests will crash firefox every time it runs with the following error information. It has no such issue on Capella, Piketon and Huronriver. I tested with firefox 4.0b12pre. And we need to set MOZ_GLX_IGNORE_BLACKLIST or it can't run.

libGL: OpenDriver: trying /opt/X11R7/lib/dri/i915_dri.so
i915_program_error: Bad inst->DstReg.Index: 3
firefox-bin: i915_program.c:248: i915_emit_texld: Assertion `dest == ((((((dest)>>29)&0x7))<< 29) | (((((dest)>>24)&0xf)) << 24) | (0 << 20) | (1 << 16) | (2 << 12) | (3 << 8) | (4 << 4) | (5 << 0))' failed.

The webpages that will crash the firefox: 
copy-tex-image-and-sub-image-2d.html, gl-clear.html, gl-teximage.html, read-pixels-test.html, tex-image-and-sub-image-2d-with-array-buffer-view.html, tex-image-and-sub-image-2d-with-image-data.html, tex-image-and-sub-image-2d-with-image.html, tex-image-and-sub-image-2d-with-video.html, tex-image-with-format-and-type.html, texture-active-bind.html, texture-complete.html, texture-formats-test.html, texture-npot.html, texture-transparent-pixels-initialized.html


Reproduce steps: 
-------------------------
1. download webglc test suite from  https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/ 
2. run those tests with MOZ_GLX_IGNORE_BLACKLIST=1 /GFX/Test/Firefox/firefox/firefox webgl-conformance-tests.html
Comment 1 meng 2011-06-02 01:57:17 UTC
The problem also exists on Pineview with Firefox(4.0.1).
--------------------------
Firefox:   Mozilla Firefox 4.0.1
Platform:  Pineview 
Libdrm:   (master)2.4.25-1-g61be94018ae9c403517d53f69357719224fa6ff3
Mesa:     (master)c5903ed4541ec4f9389e33ba27c9527afa87ec44
Xf86_video_intel:(master)2.15.0-18-g340cfb7f5271fd1df4c8948e5c9336f5b69a6e6c
Cairo:    (master)e21b373c94b1edb2828d4fee7ff45060fb22dbda
Kernel:   (drm-intel-next)90711d50d0bc3dde0c2bd214abda8cdaf62f7b2e
Comment 2 Eric Anholt 2011-07-12 16:02:12 UTC
commit 556a47a2621073185be83a0a721a8ba93392bedb
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Jul 12 15:31:39 2011 -0700

    i915: Add support for gl_FragData[0] for output color.
    
    We advertised ARB_draw_buffers, but either fell back to software when
    using this output, or assertion failed.  Fixes glsl-fs-fragdata-1, and
    failures in some webgl conformance tests.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39024
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34906
Comment 3 zhao jian 2011-07-20 19:19:25 UTC
verified with the newest code. 
Libdrm:         (master)2.4.26-1-g8d055890d90c3d92647e3d8b98d32630ef87c2c8
Mesa:           (master)8d044047f133ad4e4c4f1f6b4a4a1c4a9fa477f5
Xserver:                (master)xorg-server-1.10.99.901-115-g73864a87aacbce85b520ccaa6e360b82c0e99716
Xf86_video_intel:               (master)2.15.0-204-g3e55f3e88b40471706d5cd45c4df4010f8675c75
Cairo:          (master)4fd20fe903ebd698ec6d6fe0741d3dffb4eca74f
Libva:          (master)270299fc541c9f78efc43f1e87f6b7efd5373ec1
Kernel:         (drm-intel-next)6e96e7757a0133a9a66fd9b86cd04b5e7b88122a

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.