diff options
author | Paul Berry <[email protected]> | 2012-10-19 06:31:49 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-11-01 11:25:27 -0700 |
commit | a21116f87e44aabb6cb1f040dd557eac98144dd8 (patch) | |
tree | 39467657e0473af5ce2834be0375e06c2efeac67 /src/mesa/main/api_loopback.c | |
parent | 5a1b40acf50955d727b15dc70703a19115bb3552 (diff) |
dispatch: GLES1 fixes for _mesa_create_exec_table().
Currently, _mesa_create_exec_table() (in api_exec.c) is used for all
APIs except GLES1. In GLES1, _mesa_create_exec_table_es1() (a code
generated function) is used instead.
In principle, this shouldn't be necessary. It should be possible for
api_exec.c to contain the logic for populating the dispatch table for
all API's.
This patch paves the way for using _mesa_create_exec_table() instead
of _mesa_create_exec_table_es1(), by making _mesa_create_exec_table()
(and the functions it calls) expose the correct subset of desktop GL
functions for GLES1.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/api_loopback.c')
-rw-r--r-- | src/mesa/main/api_loopback.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 330eb22f77c..2d35f17ad05 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -37,6 +37,7 @@ #include "glapi/glthread.h" #include "main/dispatch.h" #include "mfeatures.h" +#include "main/context.h" /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc * calls to a smaller set of driver-provided formats. Currently just @@ -1503,6 +1504,10 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx, struct _glapi_table *dest) { if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) { + SET_Color4ub(dest, loopback_Color4ub_f); + SET_Materialf(dest, loopback_Materialf); + } + if (ctx->API == API_OPENGL) { SET_Color3b(dest, loopback_Color3b_f); SET_Color3d(dest, loopback_Color3d_f); SET_Color3i(dest, loopback_Color3i_f); @@ -1516,7 +1521,6 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx, SET_Color4s(dest, loopback_Color4s_f); SET_Color4ui(dest, loopback_Color4ui_f); SET_Color4us(dest, loopback_Color4us_f); - SET_Color4ub(dest, loopback_Color4ub_f); SET_Color3bv(dest, loopback_Color3bv_f); SET_Color3dv(dest, loopback_Color3dv_f); SET_Color3iv(dest, loopback_Color3iv_f); @@ -1637,7 +1641,6 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx, SET_EvalCoord1dv(dest, loopback_EvalCoord1dv); SET_EvalCoord1fv(dest, loopback_EvalCoord1fv); SET_EvalCoord1d(dest, loopback_EvalCoord1d); - SET_Materialf(dest, loopback_Materialf); SET_Materiali(dest, loopback_Materiali); SET_Materialiv(dest, loopback_Materialiv); SET_Rectd(dest, loopback_Rectd); @@ -1685,7 +1688,7 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx, SET_VertexAttribs4ubvNV(dest, loopback_VertexAttribs4ubvNV); } - if (ctx->API != API_OPENGLES2) { + if (_mesa_is_desktop_gl(ctx)) { SET_VertexAttrib1sARB(dest, loopback_VertexAttrib1sARB); SET_VertexAttrib1dARB(dest, loopback_VertexAttrib1dARB); SET_VertexAttrib2sARB(dest, loopback_VertexAttrib2sARB); |