Bug 44613

Summary: use FBO to render with pointcoord will cause rendering reversed in vertical direction
Product: Mesa Reporter: zhao jian <jian.j.zhao>
Component: Drivers/DRI/i965Assignee: Yuanhan Liu <yuanhan.liu>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: test case for rendering FBO with point coordinate

Description zhao jian 2012-01-09 23:44:32 UTC
System Environment:
--------------------------
Mesa:        (master)009ac0618ccb8c1347c353b576442ed70592c20e

Bug detailed description:
-------------------------
When use FBO for test with pointcoord will cause rendering reversed in vertical direction. Attached a test case to reproduce it. 

Reproduce steps:
-------------------------
1. xinit
2. run test case gl-pointcoord
Comment 1 zhao jian 2012-01-09 23:46:11 UTC
Created attachment 55367 [details]
test case for rendering FBO with point coordinate
Comment 2 Yuanhan Liu 2012-01-27 18:05:47 UTC
Fixed by the following commit in master:

commit eaf360e5bffc5630789367020252cd12fe586177
Author: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Date:   Fri Jan 20 07:48:52 2012 +0800

    i965: fix inverted point sprite origin when rendering to FBO

    When rendering to FBO, rendering is inverted. At the same time, we would
    also make sure the point sprite origin is inverted. Or, we will get an
    inverted result correspoinding to rendering to the default winsys FBO.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44613

    NOTE: This is a candidate for stable release branches.

    v2: add the simliar logic to ivb, too (comments from Ian)
        simplify the logic operation (comments from Brian)

    v3: pick a better comment from Eric
        use != for the logic instead of ^ (comments from Ian)

    Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 3 zhao jian 2012-02-12 18:41:29 UTC
It worked well on SandyBridge now. Verified. But it still fail on Ironlake and Pineview platform, but these are different things. I will open new bugs for them.

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.