Bug 45872

Summary: [bisected PNV] oglc mustpass(basic.stipple) regressed on pineview
Product: Mesa Reporter: fangxun <xunx.fang>
Component: Drivers/DRI/i915Assignee: Ian Romanick <idr>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: high    
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 42993    
Attachments: Proposed work-around

Description fangxun 2012-02-10 01:20:47 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       Pineview
Libdrm:         (master)2.4.31-1-g2cfac57d364d0166ed9472b086c16aea376f495a
Mesa:           (8.0)e86d90eb208292916c8a04c5d75499492003dd16
Xserver:      (server-1.11-branch)xorg-server-1.11.3
Xf86_video_intel:  (master)2.17.0-644-g4d8369f8e60fd4f5a0ef49f3e9866ea5ecb21927
Kernel:         (drm-intel-fixes) 617cf884810b44384fe8e9431e9babeb80a2ff37

Bug detailed description:
------------------------- 
It fails at mesa master and mesa 8.0 branch on pineview. Below cases also fail:
linestip(basic.allCases)
tristip(basic.fan) 
tristip(basic.strip) 
tristip(basic.triangles)
polystip(basic.allCases)

Bisect shows 85a52bf7b5f5f0317d15a51f94f294fc5e72d936 is the first bad commit.
commit 85a52bf7b5f5f0317d15a51f94f294fc5e72d936
Author:     Ian Romanick <ian.d.romanick@intel.com>
AuthorDate: Thu Jan 19 17:29:37 2012 -0800
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Fri Jan 27 18:02:42 2012 -0800

    swrast: Use fixed-function processing instead _TexEnvProgram for DrawPixels

    This is a hack to work around drivers such as i965 that:

        - Set _MaintainTexEnvProgram to generate GLSL IR for
          fixed-function fragment processing.
        - Don't call _mesa_ir_link_shader to generate Mesa IR from the
          GLSL IR.
        - May use swrast to handle glDrawPixels.

    Since _mesa_ir_link_shader is never called, there is no Mesa IR to
    execute.  Instead do regular fixed-function processing.

    Even on platforms that don't need this, the software fixed-function
    code is much faster than the software shader code.

    NOTE: This is a candidate for the 8.0 branch.

    
Reproduce steps:
----------------
1. start X
2. ./oglconform -z -s -suite all -v 2 -test mustpass basic.stipple
Comment 1 Ian Romanick 2012-02-10 11:54:56 UTC
*** Bug 45878 has been marked as a duplicate of this bug. ***
Comment 2 Paul Berry 2012-02-10 13:05:46 UTC
The following Piglit failures also bisect to this commit:
general/linestipple 
glean/paths 
spec/OpenGL_1.2_texwrap-3D-bordercolor 
spec/OpenGL_1.2_texwrap-3D-proj-bordercolor 
texturing/texrect-many
Comment 3 Ian Romanick 2012-02-10 16:16:18 UTC
Created attachment 56892 [details] [review]
Proposed work-around
Comment 4 Ian Romanick 2012-02-10 16:18:38 UTC
*** Bug 45876 has been marked as a duplicate of this bug. ***
Comment 5 Ian Romanick 2012-02-15 14:53:16 UTC
Fixed on 8.0 branch by:

commit ff1d9450321d5fe164611f819ee299706d9cbe02
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Fri Feb 10 16:00:27 2012 -0800

    swrast: Only avoid empty _TexEnvPrograms
    
    If the generated shader for _TexEnvProgram is empty, force the use of
    the fixed-function code.  Otherwise, go ahead and use the shader.
    This works around a mysterious issue on i915 where fixed-function
    software fallbacks are not working correctly.
    
    This isn't really the fix we want, but it works around the issue.
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45872
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45876
    (cherry picked from commit 3e22d4e5fc32dafcb9669a9d6376323aa88e300c)
Comment 6 fangxun 2012-03-14 20:59:28 UTC
Verified with mesa master branch(ead3589aa) and mesa 8.0 branch(437ed1faaf6).

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.