Bug 66213 - Certain Mesa Demos Rendering Inverted (vertically)
Certain Mesa Demos Rendering Inverted (vertically)
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Demos
9.1
Other Linux (All)
: medium major
Assigned To: mesa-dev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-26 16:45 UTC by Jesus Cortez
Modified: 2013-12-01 06:56 UTC (History)
0 users

See Also:


Attachments
Demonstrates readpix text inversion (252.29 KB, image/png)
2013-06-26 16:45 UTC, Jesus Cortez
Details
demonstrates winpos inversion (436.39 KB, image/png)
2013-06-26 16:46 UTC, Jesus Cortez
Details
Demonstrates readpix text inversion (252.29 KB, image/png)
2013-06-26 16:47 UTC, Jesus Cortez
Details
output of /usr/lib64/glinfo (3.68 KB, text/plain)
2013-06-26 21:03 UTC, Jesus Cortez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesus Cortez 2013-06-26 16:45:57 UTC
Created attachment 81483 [details]
Demonstrates readpix text inversion

After upgrading to Mesa-9.0 drivers, we noticed that rendering was flipped vertically in our application.

Upon further investigation, I found similar behavior in the following Mesa demos:

readpix : press f, and notice the text / images being drawn upside down
tessdemo: Clicking on the mouse places a point on the correct X coordinate, but on the opposite Y coordinate
winpos: running the example, the images are upside down.
Comment 1 Jesus Cortez 2013-06-26 16:46:40 UTC
Created attachment 81484 [details]
demonstrates winpos inversion
Comment 2 Jesus Cortez 2013-06-26 16:47:48 UTC
Created attachment 81485 [details]
Demonstrates readpix text inversion
Comment 3 Ian Romanick 2013-06-26 18:44:08 UTC
Mesa 9.0 isn't really maintained any longer.

Can you try current 9.1 branch?  There were some fixes on master that I recently cherry picked over to the branch.
Comment 4 Ian Romanick 2013-06-26 18:45:22 UTC
Also, what driver are you using?  The output of "glxinfo | grep renderer" should provide the necessary information.
Comment 5 Jesus Cortez 2013-06-26 21:03:55 UTC
Created attachment 81511 [details]
output of /usr/lib64/glinfo
Comment 6 Jesus Cortez 2013-06-26 21:52:37 UTC
I am on Scientific Linux 6.3. How can I install the 9.1 version? I'm not able to find that on the Add/Remove software, and trying to compile the source results in errors such as "Requested 'libdrm_radeon >= 2.4.42' but version of libdrm_radeon is 2.4.39"
Comment 7 Jesus Cortez 2013-06-27 19:12:17 UTC
Here's some more (hopefully helpful) information:

If I start the drawpix example, everything looks fine. But the second I hit f to draw to the GL_FRONT buffer, the image becomes vertically inverted, and the keyboard controls are inverted as well. I think the problem is happening in the glDrawPixels function, based on the amount of debugging I've done into the issue so far.
Comment 8 Jesus Cortez 2013-06-27 19:13:15 UTC
(In reply to comment #4)
> Also, what driver are you using?  The output of "glxinfo | grep renderer"
> should provide the necessary information.

According to glinfo,

GL_RENDERER: Software Rasterizer
Comment 9 Ian Romanick 2013-12-01 06:56:33 UTC
Should be fixed by:

commit a43b49dfb13dc7e6d2d6d7ceee892077038d7102
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Nov 13 12:53:52 2013 +1000

    mesa/swrast: fix inverted front buffer rendering with old-school swrast
    
    I've no idea when this broke, but we have some people who wanted it fixed,
    so here's my attempt.
    
    reproducer, run readpix with swrast hit f, or run trival tri -sb things are
    upside down, after this patch they aren't.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62142
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66213
    
    Cc: <mesa-stable@lists.freedesktop.org>"
    Signed-off-by: Dave Airlie <airlied@redhat.com>