Bug 23469 - r600 glVertex2f rendering error
Summary: r600 glVertex2f rendering error
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R600 (show other bugs)
Version: 5.0.2
Hardware: Other FreeBSD
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-22 20:23 UTC by vehemens
Modified: 2009-09-03 07:09 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description vehemens 2009-08-22 20:23:19 UTC
mesa demo engine does not correct render the top and bottom plates of the engine block.  it is most noticeable in wire frame mode.

while rotating the view, it was determined that the rendering error was only along one axis.

the plates are defined using routine SquareWithHole() which in-turn uses glVertex2f(x,y).  switching to glVertex3f(x,y,0.0) eliminates the rendering problem.
Comment 1 Alex Deucher 2009-08-24 07:20:39 UTC
Cooper looked into this and found the root cause.  We currently set up the vertex fetch as part of the vertex shader itself. So if the vertex format changes we end up with the wrong vertex format in the fetch clause.  The fix is to either recompile a new vertex shader every time the vertex format changes or, preferably, switch using fetch shaders.  Then the vertex shader would only need to be compiled once, and the fetch shader would be adjusted for the changing vertex format.  This probably explains most of the remaining corruption issues.
Comment 2 Adam Jackson 2009-08-24 12:33:18 UTC
Mass version move, cvs -> git
Comment 3 Cooper Yuan 2009-08-26 01:38:52 UTC
Fixed, please try this patch: 
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dadf138ddbaecd7fff239df7961aac25e74f14f6
Comment 4 Rafał Miłecki 2009-08-26 02:02:12 UTC
(In reply to comment #3)
> Fixed, please try this patch: 
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=dadf138ddbaecd7fff239df7961aac25e74f14f6


According to Alex fixing this bug should fix LIBGL_ALWAYS_INDIRECT=0. Stripped log:

<Zajec2> agd5f: could you say something about LIBGL_ALWAYS_INDIRECT?
<Zajec2> agd5f: when value of LIBGL_ALWAYS_INDIRECT is 0, openarena has corruptions
<Zajec2> is this somethign hard to fix?
<Zajec2> (openarena is just my case... other ppl reported that on other apps)
<yangman> Terman: try suspend to disk. you can't see it corrupting at suspend time on suspend-to-ram even if it is
<agd5f> Zajec2: see my comment on this bug: http://bugs.freedesktop.org/show_bug.cgi?id=23469

I tried current git and openarena is still broken on my RV620 without specifing LIBGL_ALWAYS_INDIRECT. When I type LIBGL_ALWAYS_INDIRECT=1, openarena's menu is not corrupted.
Comment 5 John Bridgman 2009-08-26 11:35:56 UTC
The patch does seem to fix the original problem, which was corruption of the "block" option with the mesa/progs/demos/engine demo. 

Do we want to close this bug and open a new one for openarena corruption in direct rendering, or just update this one to reflect the more general problems ? 

Note that ppracer also shows corruption of the course with direct rendering but not with indirect rendering.
Comment 6 Alex Deucher 2009-08-26 15:01:41 UTC
engine fixed with dadf138ddbaecd7fff239df7961aac25e74f14f6
Comment 7 vehemens 2009-08-27 21:03:25 UTC
i can confirm this fixes the engine vertex problem. thanks.


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.