Bug 32589

Summary: Glean/clipFlat fail
Product: Mesa Reporter: Yi Sun <yi.sun>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: VERIFIED FIXED QA Contact: lu hua <huax.lu>
Severity: major    
Priority: medium CC: bugs.freedesktop, haihao.xiang, xunx.fang, zhenyu.z.wang
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: dmesg

Description Yi Sun 2010-12-22 17:29:25 UTC
System Environment:
--------------------------
Kernel_version:   (drm-intel-fixes)448f53a1ede54eb854d036abf54573281412d650
Libdrm:           (master)2.4.23                  
Mesa:           (7.10)612e26e82c60809ab9c81213f39fbe527284af9f
Xserver:         (server-1.9-branch)xorg-server-1.9.3-6-ga2c674b75d3b1a663bece6f6e2e34c3e71e6be55
Xf86_video_intel:  (master)2.13.902-3-g5743c223877fbff710cdd5114cff6d3ee3108309

Bug detailed description:
-------------------------
The case passes on Ironlake.
Comment 1 Yi Sun 2010-12-22 17:30:33 UTC
Created attachment 41388 [details]
dmesg
Comment 2 Yi Sun 2010-12-22 18:20:20 UTC
The output while running the case clipFlat.

clipFlat: Failure for glBegin/End(GL_TRIANGLE_FAN), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0, 0, 1)
clipFlat:  FAIL rgba8, db, z24, s8, win+pmap, id 33
clipFlat: Failure for glBegin/End(GL_TRIANGLE_FAN), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0, 0, 1)
clipFlat:  FAIL rgba8, db, z24, s8, win+pmap, id 34
clipFlat: Failure for glBegin/End(GL_TRIANGLE_FAN), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0, 0, 1)
clipFlat:  FAIL rgba8, db, z24, s8, win+pmap, id 105
(EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  137 (DRI2)
  Minor opcode of failed request:  8 (DRI2SwapBuffers           )
  Resource id in failed request:  0x60000b
  Serial number of failed request:  5264
  Current serial number in output stream:  5264
Comment 3 Wang Zhenyu 2011-01-03 23:59:25 UTC
Fixed by 
commit 9977297ad9bc0e816810bd3a39d89e5c1cffff72
Author: Zhenyu Wang <zhenyuw@linux.intel.com>
Date:   Tue Jan 4 13:46:13 2011 +0800

    i965: Fix provoking vertex select in clip state for sandybridge
    
    Triangle fan provoking vertex for first convention should be
    'vertex 1' in sandybridge clip state.
    
    Partly fix glean/clipFlat case

commit bea6539abff17f39c822ac9c1c94f8249c396b18
Author: Zhenyu Wang <zhenyuw@linux.intel.com>
Date:   Tue Jan 4 15:25:43 2011 +0800

    i965: Use last vertex convention for quad provoking vertex on sandybridge
    
    Until we know how hw converts quads to polygon in beginning of
    3D pipeline, for now unconditionally use last vertex convention.
    
    Fix glean/clipFlat case.
Comment 4 Gordon Jin 2011-01-04 17:00:15 UTC
zhenyu, please close the bug only when you commmit to the release branch.
Comment 5 Wang Zhenyu 2011-01-04 18:51:32 UTC
Eric helped to commit to 7.10 now. Close.
Comment 6 Yi Sun 2011-01-06 22:35:32 UTC
The case still fail,now. The output is as following:

clipFlat:  PASS rgba8, db, z24, s8, win+pmap, id 33
clipFlat:  PASS rgba8, db, z24, s8, win+pmap, id 34
clipFlat:  PASS rgba8, db, z24, s8, win+pmap, id 103
(EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  137 (DRI2)
  Minor opcode of failed request:  8 (DRI2SwapBuffers           )
  Resource id in failed request:  0x60000b
  Serial number of failed request:  7846
  Current serial number in output stream:  7846
Comment 7 Gordon Jin 2011-01-07 00:50:35 UTC
so it's still broken in QA's machine, even with master.
Comment 8 Wang Zhenyu 2011-01-08 20:18:56 UTC
I just run --quick glean test that passed. So looks like dri2 drawable failure somehow, but not relate to driver support for provoking vertex.
Comment 9 Michael Fu 2011-01-23 18:50:39 UTC
(In reply to comment #8)
> I just run --quick glean test that passed. So looks like dri2 drawable failure
> somehow, but not relate to driver support for provoking vertex.

do you mean a new bug?
Comment 10 fangxun 2011-03-07 05:47:28 UTC
Tested with latest code, this case still fails on sandybridge. It also fails on Ironlake and pineview.
Comment 11 Gordon Jin 2011-03-07 17:06:32 UTC
Xun/Yi, can you check when it turned from pass to fail on Ironlake?
Comment 12 Eric Anholt 2011-06-01 13:52:51 UTC
command line for reproducing the problem quickly -- third or fourth visual tested:

vblank_mode=0 ./bin/glean -r asdf -t clipFlat -o
Comment 13 Michel Dänzer 2011-09-14 10:43:07 UTC
The DRI2SwapBuffers failure should be fixed in Mesa Git.
Comment 14 Gordon Jin 2012-07-01 18:41:36 UTC
Hua, can you check the current test result?
Comment 15 lu hua 2012-07-11 01:51:46 UTC
Current test result:'skip'

Output:
Test clipping with flat shading (provoking vertex).

clipFlat:  PASS rgba8, db, z24, s8, win+pmap, id 33
Function "ProvokingVertex" not supported on this implementation
PIGLIT: {'result': 'skip' }
Comment 16 Eric Anholt 2012-11-18 18:42:55 UTC
The bug reported here did not show up in your log in the reopening of this bug report, so don't reopen it.
Comment 17 lu hua 2012-11-20 07:34:53 UTC
It passes on ivybridge,sandybridge and ironlake.
It still fails on pineview.
output:
Test clipping with flat shading (provoking vertex).

clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, z24, s8, win+pmap, id 33
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, z24, s8, win+pmap, id 34
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, z24, s8, win+pmap, id 92
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, win+pmap, id 129
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, win+pmap, id 130
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, z24, s8, win+pmap, id 131
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, z24, s8, win+pmap, id 132
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, win+pmap, id 133
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, win+pmap, id 134
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, z24, s8, win+pmap, id 135
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, z24, s8, win+pmap, id 136
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, z24, s8, accrgb16, win+pmap, slow, id 137
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, z24, s8, accrgba16, win+pmap, slow, id 138
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, win+pmap, id 139
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, win+pmap, id 140
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, z24, s8, win+pmap, id 141
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, z24, s8, win+pmap, id 142
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, win+pmap, id 143
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, win+pmap, id 144
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, z24, s8, win+pmap, id 145
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, z24, s8, win+pmap, id 146
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgb8, db, z24, s8, accrgb16, win+pmap, slow, id 147
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, z24, s8, win+pmap, id 148
clipFlat: Failure for glBegin/End(GL_TRIANGLES), glFrontFace(GL_CCW), glPolygonMode(GL_FILL)
        Translation: -1, -1
        GL_EXT_provoking_vertex test: GL_FIRST_VERTEX_CONVENTION_EXT mode
        Expected color (0, 1, 0) but found (0.623529, 0.376471, 0)
clipFlat:  FAIL rgba8, db, z24, s8, accrgba16, win+pmap, slow, id 149
Comment 18 Gordon Jin 2012-11-21 03:08:24 UTC
I agree the original bug has been fixed.

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.