Bug 86764 - [SNB+ Bisected]Piglit glean/pointSprite fails
Summary: [SNB+ Bisected]Piglit glean/pointSprite fails
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium major
Assignee: Chris Forbes
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2014-11-27 07:09 UTC by lu hua
Modified: 2014-12-08 01:42 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description lu hua 2014-11-27 07:09:57 UTC
System Environment:
Platform: IVB
Libdrm:		(master)libdrm-2.4.58-13-gfb4177046de19730a784c3c16e4b73aab0ec6e41
Mesa:		(master)531feec9dc4680046f21c517d13312c7df7b7619
Xserver:	(master)xorg-server-
Libva:		(master)c095cc6cf08523cd0dffcfe5ac4bce9122527f22
Libva_intel_driver:	(master)edbb8cdada09cd116103e68f942b0889fd767391
Kernel:   (drm-intel-nightly)a834a782adf3ab4b508cd80e9082960263bcc4ed

Bug detailed description:
It fails on IVB with mesa master branch, works well on 10.4 branch.

Bisect shows: 0008d0e59eff365079323918508ffc87355a6bfd is the first bad commit
commit 0008d0e59eff365079323918508ffc87355a6bfd
Author:     Chris Forbes <chrisf@ijw.co.nz>
AuthorDate: Tue Nov 25 09:44:19 2014 +1300
Commit:     Chris Forbes <chrisf@ijw.co.nz>
CommitDate: Tue Nov 25 22:38:32 2014 +1300

    i965/Gen6-7: Do not replace texcoords with point coord if not drawing points

    Fixes broken rendering in Windows-based QtQuick2 apps run through Wine.
    This library sets all texture units' GL_COORD_REPLACE, leaves point
    sprite mode enabled, and then draws a triangle fan.

    Will need a slightly different fix for Gen4-5, but I don't have my old
    machines in a usable state currently.

    V2: - Simplify patch -- the real changes are no longer duplicated across
          the Gen6 and Gen7 atoms.
        - Also don't clobber attr overrides -- which matters on Haswell too,
          and fixes the other half of the problem
        - Fix newly-introduced warnings
    V3: - Use BRW_NEW_GEOMETRY_PROGRAM and brw->geometry_program rather than
          core flag and state; keep the state flags in order.

    Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
    Cc: "10.4" <mesa-stable@lists.freedesktop.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84651
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

Test basic point sprite functionality.

Incorrect pixel at (20, 19):
        it should be rendered with color: (0, 0, 1), actual read: (0, 1, 0)
        Primitive type: GL_POLYGON
        Coord Origin at: GL_UPPER_LEFT
        PointSize: 1.85
Incorrect pixel at (19, 19):
        it should be rendered with color: (0, 0, 1), actual read: (0, 1, 0)
        Primitive type: GL_POLYGON
        Coord Origin at: GL_LOWER_LEFT
        PointSize: 1.85
pointSprite:  FAIL rgba8, db, z24, s8, win+pmap, id 32
        5 tests passed, 2 tests failed.

Reproduce steps:
1. xinit
2. bin/glean -o -v -v -v -t +pointSprite --quick
Comment 1 lu hua 2014-11-28 02:41:53 UTC
It impacts SNB+ platforms.
Comment 2 lu hua 2014-12-05 02:36:55 UTC
It also happens on latest 10.4 branch.
Comment 3 Chris Forbes 2014-12-05 03:33:49 UTC
OK, I see what's wrong here. Will have a patch shortly.
Comment 4 Chris Forbes 2014-12-05 06:44:29 UTC
Patch for this is now on the list. I have verified that it fixes glean's pointSprite test, and does not rebreak various wine apps.
Comment 5 Ben Widawsky 2014-12-06 01:27:53 UTC
Please test, Lu Hua.
Comment 6 Chris Forbes 2014-12-07 20:12:03 UTC
Patch has now landed in master:

Comment 7 lu hua 2014-12-08 01:41:55 UTC
Test on latest master branch, it works well.
Comment 8 lu hua 2014-12-08 01:42:17 UTC

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.