[Mesa-dev] [PATCH] tnl: Add support for datatype GL_FIXED in vertex arrays

Brian Paul brian.e.paul at gmail.com
Tue Feb 15 12:19:26 PST 2011


On Tue, Feb 15, 2011 at 1:05 PM, Chad Versace <chad at chad-versace.us> wrote:
> On 02/14/2011 09:08 PM, Eric Anholt wrote:
>> Don't suppose we have a testcase for these?  It could go easily in the
>> ARB_ES2_compat directory without needing new framework stuff.
>
> Just wrote a test case in ARB_ES2_compat, and encountered problems. The
> GL_FIXED enum is not a valid type for glVertexAttribPointer, even though
> ARB_ES2_compat is advertised. Hmm... I'll look into that.

This is probably it:

diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index cfed4b5..610a066 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -128,8 +128,11 @@ update_array(struct gl_context *ctx,
    GLsizei elementSize;
    GLenum format = GL_RGBA;

-   if (ctx->API != API_OPENGLES && ctx->API != API_OPENGLES2) {
-      /* fixed point arrays / data is only allowed with OpenGL ES 1.x/2.0 */
+   if (ctx->API != API_OPENGLES && ctx->API != API_OPENGLES2 &&
+       !ctx->Extensions.ES2_compatibility) {
+      /* fixed point arrays / data is only allowed with OpenGL ES 1.x/2.0
+       * or GL_ARB_ES2_compatibility.
+       */
       legalTypesMask &= ~FIXED_BIT;
    }

-Brian


More information about the mesa-dev mailing list