summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texgen.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-10-19 06:31:49 -0700
committerPaul Berry <[email protected]>2012-11-01 11:25:27 -0700
commita21116f87e44aabb6cb1f040dd557eac98144dd8 (patch)
tree39467657e0473af5ce2834be0375e06c2efeac67 /src/mesa/main/texgen.c
parent5a1b40acf50955d727b15dc70703a19115bb3552 (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/texgen.c')
-rw-r--r--src/mesa/main/texgen.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index 0b0f673356a..c5a87864464 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -426,15 +426,17 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
void
-_mesa_init_texgen_dispatch(struct _glapi_table *disp)
+_mesa_init_texgen_dispatch(struct gl_context *ctx, struct _glapi_table *disp)
{
- SET_GetTexGendv(disp, _mesa_GetTexGendv);
SET_GetTexGenfv(disp, _mesa_GetTexGenfv);
SET_GetTexGeniv(disp, _mesa_GetTexGeniv);
- SET_TexGend(disp, _mesa_TexGend);
- SET_TexGendv(disp, _mesa_TexGendv);
SET_TexGenf(disp, _mesa_TexGenf);
SET_TexGenfv(disp, _mesa_TexGenfv);
SET_TexGeni(disp, _mesa_TexGeni);
SET_TexGeniv(disp, _mesa_TexGeniv);
+ if (ctx->API == API_OPENGL) {
+ SET_GetTexGendv(disp, _mesa_GetTexGendv);
+ SET_TexGend(disp, _mesa_TexGend);
+ SET_TexGendv(disp, _mesa_TexGendv);
+ }
}