Bug 25898 - glEvalPoint causes glEnd to throw GL_INVALID_OPERATION
Summary: glEvalPoint causes glEnd to throw GL_INVALID_OPERATION
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: marius predut
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-04 22:14 UTC by David
Modified: 2015-06-04 10:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Code demonstrating the assert failure. (2.34 KB, text/x-csrc)
2010-01-04 22:14 UTC, David
Details
app outputs (5.93 KB, image/jpeg)
2015-05-21 13:22 UTC, marius predut
Details

Description David 2010-01-04 22:14:12 UTC
Created attachment 32454 [details]
Code demonstrating the assert failure.

If this is the wrong place to report this, please point me in the right direction.

Recently I've been working on a game, and a bit of code that worked fine in nvidia's proprietary libGL implementation fails an assertion in the mesa version.

Basically, using glEvalPoint2 inside of a glBegin/glEnd block all inside a glNewList/glEndList block seemingly has no effect (nothing is drawn when the display list is called).  Putting a glVertex3f call in the same glBegin/End block along with the calls to glEvalPoint causes a failed assertion:

vbo/vbo_save_api.c:503: _save_upgrade_vertex: Assertion `save->copied.nr == 0' failed.

Using glVertex with no calls to glEvalPoint draws properly, and using glEvalMesh instead of glBegin/glEvalPoint/glEnd works properly as well.

Again, all forms of the code work fine on nvidia's proprietary drivers.

Attached is a pretty short bit of C that demonstrates the error.  Comment out the defines at the top of the page to use the glEvalPoint code that causes the assert fail.  The code uses SDL to set up the window and rendering context.

With both defines enabled, glEvalMesh is used and a box should be drawn in the center of the screen.
Disabling the WORK_PLEASE define will use glEvalPoint, which draws nothing despite drawing the same box on nvidia's implementation.
Disabling both WORK_PLEASE and DONT_CRASH will insert a glVertex call that causes the assert error.  Again, running on nvidia's proprietary implementation draws a box.

I hope I've supplied sufficient detail; ask if you need any more information.
Comment 1 Roland Scheidegger 2010-01-05 09:15:59 UTC
This looks rather like a mesa bug. What mesa version is this (glxinfo).
Comment 2 David 2010-01-05 10:24:48 UTC
glxinfo returns OpenGL 1.4 Mesa 7.6
Comment 3 Marek Olšák 2011-03-02 04:14:11 UTC
The assertion failure is gone. The only remaining issue is the error on glEnd.
Comment 4 Brian Paul 2015-05-20 20:11:16 UTC
I just retested this app with Mesa master (git 4445bbf) and I don't see any errors.  Probably fixed long since Mesa 7.6.  Closing.
Comment 5 marius predut 2015-05-21 13:22:50 UTC
Created attachment 115947 [details]
app outputs

no matter if defines or not.
Comment 6 marius predut 2015-05-21 13:24:58 UTC
I confirm that this app don't generate any errors. With or without proposed defines the outputs are identical - see above comments.


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.