|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
bug in piglit vbo-map-remap.c test?I believe there's a bug in the piglit vbo-map-remap.c test. The test fails for me with a GL_INVALID_ENUM error that comes from glEnable(GL_VERTEX_ARRAY). GL_VERTEX_ARRAY is a client-side capability so the error seems valid.
tests/general/vbo-map-remap.c 42 static void 43 init() 44 { 45 46 glewInit(); 47 glMatrixMode(GL_PROJECTION); 48 glPushMatrix(); 49 glLoadIdentity(); 50 glOrtho(0, 400, 0, 300, -1, 1); 51 52 glMatrixMode(GL_MODELVIEW); 53 glPushMatrix(); 54 glLoadIdentity(); 55 -> 56 glEnable(GL_VERTEX_ARRAY); 57 58 glGenBuffersARB(1, &vbo); 59 glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); 60 glBufferDataARB(GL_ARRAY_BUFFER_ARB, 12 * sizeof(GLfloat), 61 NULL, GL_DYNAMIC_DRAW); 62 } If I remove the glEnable line, the test passes for me. diff --git a/tests/general/vbo-map-remap.c b/tests/general/vbo-map-remap.c index f9eb288..45fb998 100644 --- a/tests/general/vbo-map-remap.c +++ b/tests/general/vbo-map-remap.c @@ -53,8 +53,6 @@ init() glPushMatrix(); glLoadIdentity(); - glEnable(GL_VERTEX_ARRAY); - glGenBuffersARB(1, &vbo); glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); glBufferDataARB(GL_ARRAY_BUFFER_ARB, 12 * sizeof(GLfloat), ------------------------------------------------------------------------------ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
|
|
Re: bug in piglit vbo-map-remap.c test?On Thu, 2009-07-02 at 22:20 -0700, Vinson Lee wrote:
> I believe there's a bug in the piglit vbo-map-remap.c test. The test > fails for me with a GL_INVALID_ENUM error that comes from > glEnable(GL_VERTEX_ARRAY). GL_VERTEX_ARRAY is a client-side capability > so the error seems valid. Mesa's been accepting array enums in Enable/Disable as if it was Enable/DisableClientState since the initial revision in CVS, it looks like. If this is in fact invalid and other vendors throw errors on it, I'd like to see Mesa follow suit. However, tests should be strict in what they test, so please apply. -- Eric Anholt eric@... eric.anholt@... ------------------------------------------------------------------------------ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
|
|
Re: bug in piglit vbo-map-remap.c test?glEnable() vs glEnableClientState() is a big deal when Xserver != Xclient, in theory. I can verify that on Win32/NVidia that replacing **only** glEnable/DisableClientState(GL_VERTEX_ARRAY) with glEnable/Disable(GL_VERTEX_ARRAY) causes random polygons to flash and general corruption of the scene geometry. Replacing them again with glEnable/DisableClientState() fixes the issue. I did not try to get the error code, but seriously, if the scene turns to garbage, I could care less about whether NVidia generates an error code for it too. The manpages specifically enumerate the constants and GL_VERTEX_ARRAY just isn't there.
Patrick On Sun, Jul 5, 2009 at 10:02 PM, Eric Anholt <eric@...> wrote:
------------------------------------------------------------------------------ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
|
|
Re: bug in piglit vbo-map-remap.c test?-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Vinson Lee wrote: > I believe there's a bug in the piglit vbo-map-remap.c test. The test fails for me with a GL_INVALID_ENUM error that comes from glEnable(GL_VERTEX_ARRAY). GL_VERTEX_ARRAY is a client-side capability so the error seems valid. > > tests/general/vbo-map-remap.c > 42 static void > 43 init() > 44 { > 45 > 46 glewInit(); > 47 glMatrixMode(GL_PROJECTION); > 48 glPushMatrix(); > 49 glLoadIdentity(); > 50 glOrtho(0, 400, 0, 300, -1, 1); > 51 > 52 glMatrixMode(GL_MODELVIEW); > 53 glPushMatrix(); > 54 glLoadIdentity(); > 55 > -> 56 glEnable(GL_VERTEX_ARRAY); > 57 > 58 glGenBuffersARB(1, &vbo); > 59 glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); > 60 glBufferDataARB(GL_ARRAY_BUFFER_ARB, 12 * sizeof(GLfloat), > 61 NULL, GL_DYNAMIC_DRAW); > 62 } > > > If I remove the glEnable line, the test passes for me. Right. It should be glEnableClientState. Separation of client and server state for the win. Just removing the enable completely disables the use of vertex arrays, which defeats the point of the test. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpSInwACgkQX1gOwKyEAw+6ngCeNeW6dNJhO4kY9I24a6BFJHuo SlMAnilBGJ76fwUC9m5mxoSS9BE7RYMB =X9Xf -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
|
|
Re: bug in piglit vbo-map-remap.c test?There's a glEnableClientState(GL_VERTEX_ARRAY) later on in the test.
Is that one sufficient enough, or does the glEnable(GL_VERTEX_ARRAY) in init() need to be coverted to glEnableClientState(GL_VERTEX_ARRAY) instead of simply being removed? tests/general/vbo-map-remap.c 79 static void 80 display() 81 { 82 GLfloat white[4] = {1.0, 1.0, 1.0, 0.0}; 83 GLboolean pass = GL_TRUE; 84 GLfloat varray1[12] = {175, 125, 0, 85 175, 175, 0, 86 125, 125, 0, 87 125, 175, 0}; 88 GLfloat varray2[12] = {275, 125, 0, 89 275, 175, 0, 90 225, 125, 0, 91 225, 175, 0}; 92 GLenum err; 93 94 glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); 95 -> 96 glEnableClientState(GL_VERTEX_ARRAY); 97 glVertexPointer(3, GL_FLOAT, 0, 0); 98 99 vbo_write_floats_mapped(varray1, 12); 100 101 glClear(GL_COLOR_BUFFER_BIT); 102 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 103 104 vbo_write_floats_mapped(varray2, 12); 105 106 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 107 108 if ((err = glGetError()) != 0) { 109 printf("gl error: 0x%08x\n", err); 110 pass = GL_FALSE; 111 } 112 113 pass = pass && piglit_probe_pixel_rgb(250, 150, white); 114 pass = pass && piglit_probe_pixel_rgb(150, 150, white); 115 116 glutSwapBuffers(); 117 118 glDisableClientState(GL_VERTEX_ARRAY); 119 120 if (Automatic) 121 piglit_report_result(pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE); 122 } ________________________________________ From: Ian Romanick [idr@...] Sent: Monday, July 06, 2009 9:12 AM To: Vinson Lee Cc: eric@...; shranzel@...; mesa3d-dev@... Subject: Re: [Mesa3d-dev] bug in piglit vbo-map-remap.c test? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Vinson Lee wrote: > I believe there's a bug in the piglit vbo-map-remap.c test. The test fails for me with a GL_INVALID_ENUM error that comes from glEnable(GL_VERTEX_ARRAY). GL_VERTEX_ARRAY is a client-side capability so the error seems valid. > > tests/general/vbo-map-remap.c > 42 static void > 43 init() > 44 { > 45 > 46 glewInit(); > 47 glMatrixMode(GL_PROJECTION); > 48 glPushMatrix(); > 49 glLoadIdentity(); > 50 glOrtho(0, 400, 0, 300, -1, 1); > 51 > 52 glMatrixMode(GL_MODELVIEW); > 53 glPushMatrix(); > 54 glLoadIdentity(); > 55 > -> 56 glEnable(GL_VERTEX_ARRAY); > 57 > 58 glGenBuffersARB(1, &vbo); > 59 glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); > 60 glBufferDataARB(GL_ARRAY_BUFFER_ARB, 12 * sizeof(GLfloat), > 61 NULL, GL_DYNAMIC_DRAW); > 62 } > > > If I remove the glEnable line, the test passes for me. Right. It should be glEnableClientState. Separation of client and server state for the win. Just removing the enable completely disables the use of vertex arrays, which defeats the point of the test. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpSInwACgkQX1gOwKyEAw+6ngCeNeW6dNJhO4kY9I24a6BFJHuo SlMAnilBGJ76fwUC9m5mxoSS9BE7RYMB =X9Xf -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
|
|
Re: bug in piglit vbo-map-remap.c test?-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Vinson Lee wrote: > There's a glEnableClientState(GL_VERTEX_ARRAY) later on in the test. > > Is that one sufficient enough, or does the glEnable(GL_VERTEX_ARRAY) in init() need to be coverted to glEnableClientState(GL_VERTEX_ARRAY) instead of simply being removed? Ah, yes. Just the one should be fine. :) I pushed this fixed and a couple minor clean-ups just a minute ago. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpSSEoACgkQX1gOwKyEAw/FOwCgioO5zlp+BOb6Xcz7anoIsRJD nAgAnAlw61UAFq5wtOnr4fqQARkK45sb =HxVA -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
|
|
Re: bug in piglit vbo-map-remap.c test?Eric Anholt wrote:
> On Thu, 2009-07-02 at 22:20 -0700, Vinson Lee wrote: >> I believe there's a bug in the piglit vbo-map-remap.c test. The test >> fails for me with a GL_INVALID_ENUM error that comes from >> glEnable(GL_VERTEX_ARRAY). GL_VERTEX_ARRAY is a client-side capability >> so the error seems valid. > > Mesa's been accepting array enums in Enable/Disable as if it was > Enable/DisableClientState since the initial revision in CVS, it looks > like. If this is in fact invalid and other vendors throw errors on it, > I'd like to see Mesa follow suit. The original GL_EXT_vertex_array extension (which we still support) uses glEnable/Disable() to enable/disable vertex arrays. I believe glEnable/DisableClientState() were introduced with OpenGL 1.1. NVIDIA's driver accepts the array enums passed to glEnable/Disable() too. That said, I think I'll update a few Mesa demos to use glEnable/DisableClientState(). -Brian ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
| Free embeddable forum powered by Nabble | Forum Help |