From a010215463c63680c69e90202fe3fcd2e5b25fa6 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sat, 28 Jul 2012 15:20:48 -0700 Subject: mesa: Kill ES2 wrapper functions v2: Fix completely broken condition around ClearColorIiEXT and ClearColorIuiEXT. v3: Add special VertexAttrib handling for ES2. Signed-off-by: Ian Romanick --- src/mesa/vbo/vbo_exec_api.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'src/mesa/vbo') diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index a97f8d7f3b4..781e360d269 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -898,6 +898,7 @@ vbo_exec_PrimitiveRestartNV(void) static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) { + struct gl_context *ctx = exec->ctx; GLvertexformat *vfmt = &exec->vtxfmt; _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); @@ -946,14 +947,25 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) vfmt->Vertex4f = vbo_Vertex4f; vfmt->Vertex4fv = vbo_Vertex4fv; - vfmt->VertexAttrib1fARB = vbo_VertexAttrib1fARB; - vfmt->VertexAttrib1fvARB = vbo_VertexAttrib1fvARB; - vfmt->VertexAttrib2fARB = vbo_VertexAttrib2fARB; - vfmt->VertexAttrib2fvARB = vbo_VertexAttrib2fvARB; - vfmt->VertexAttrib3fARB = vbo_VertexAttrib3fARB; - vfmt->VertexAttrib3fvARB = vbo_VertexAttrib3fvARB; - vfmt->VertexAttrib4fARB = vbo_VertexAttrib4fARB; - vfmt->VertexAttrib4fvARB = vbo_VertexAttrib4fvARB; + if (ctx->API == API_OPENGLES2) { + vfmt->VertexAttrib1fARB = _es_VertexAttrib1f; + vfmt->VertexAttrib1fvARB = _es_VertexAttrib1fv; + vfmt->VertexAttrib2fARB = _es_VertexAttrib2f; + vfmt->VertexAttrib2fvARB = _es_VertexAttrib2fv; + vfmt->VertexAttrib3fARB = _es_VertexAttrib3f; + vfmt->VertexAttrib3fvARB = _es_VertexAttrib3fv; + vfmt->VertexAttrib4fARB = _es_VertexAttrib4f; + vfmt->VertexAttrib4fvARB = _es_VertexAttrib4fv; + } else { + vfmt->VertexAttrib1fARB = vbo_VertexAttrib1fARB; + vfmt->VertexAttrib1fvARB = vbo_VertexAttrib1fvARB; + vfmt->VertexAttrib2fARB = vbo_VertexAttrib2fARB; + vfmt->VertexAttrib2fvARB = vbo_VertexAttrib2fvARB; + vfmt->VertexAttrib3fARB = vbo_VertexAttrib3fARB; + vfmt->VertexAttrib3fvARB = vbo_VertexAttrib3fvARB; + vfmt->VertexAttrib4fARB = vbo_VertexAttrib4fARB; + vfmt->VertexAttrib4fvARB = vbo_VertexAttrib4fvARB; + } vfmt->VertexAttrib1fNV = vbo_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = vbo_VertexAttrib1fvNV; -- cgit v1.2.3