Commit a0102154 authored by Ian Romanick's avatar Ian Romanick

mesa: Kill ES2 wrapper functions

v2: Fix completely broken condition around ClearColorIiEXT and
ClearColorIuiEXT.

v3: Add special VertexAttrib handling for ES2.
Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
parent fc2219e4
......@@ -35,13 +35,10 @@ sources := \
main/api_exec_es1.c \
main/api_exec_es1_dispatch.h \
main/api_exec_es1_remap_helper.h \
main/api_exec_es2.c \
main/api_exec_es2_dispatch.h \
program/program_parse.tab.c \
program/lex.yy.c \
main/dispatch.h \
main/remap_helper.h \
main/api_exec_es2_remap_helper.h
main/remap_helper.h
LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES))
......@@ -100,9 +97,6 @@ $(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_a
$(intermediates)/main/api_exec_es1.c: $(es_src_deps)
$(call es-gen, -V GLES1.1)
$(intermediates)/main/api_exec_es2.c: $(es_src_deps)
$(call es-gen, -V GLES2.0)
$(intermediates)/main/api_exec_%_dispatch.h: $(es_hdr_deps)
$(call es-gen, -c $* -m remap_table)
......
......@@ -51,10 +51,7 @@ BUILT_SOURCES = \
main/git_sha1.h \
main/api_exec_es1_dispatch.h \
main/api_exec_es1_remap_helper.h \
main/api_exec_es2_dispatch.h \
main/api_exec_es2_remap_helper.h \
main/api_exec_es1.c \
main/api_exec_es2.c \
program/program_parse.tab.c \
program/program_parse.tab.h \
program/lex.yy.c
......@@ -70,22 +67,10 @@ main/api_exec_es1_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_d
main/api_exec_es1.o: main/api_exec_es1_dispatch.h main/api_exec_es1_remap_helper.h
main/api_exec_es2_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps)
$(call glapi_gen_dispatch,$<,es2)
main/api_exec_es2_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps)
$(call glapi_gen_remap,$<,es2)
main/api_exec_es2.o: main/api_exec_es2_dispatch.h main/api_exec_es2_remap_helper.h
main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
$(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/main/es_generator.py \
-S $(srcdir)/main/APIspec.xml -V GLES1.1 > $@
main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
$(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/main/es_generator.py \
-S $(srcdir)/main/APIspec.xml -V GLES2.0 > $@
program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
$(MKDIR_P) program
$(AM_V_GEN) $(YACC) -v -d --output=program/program_parse.tab.c $<
......
......@@ -344,12 +344,6 @@ if env['gles']:
source = 'main/APIspec.xml',
command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES1.1 > $TARGET'
)
gles_sources += env.CodeGenerate(
target = 'main/api_exec_es2.c',
script = 'main/es_generator.py',
source = 'main/APIspec.xml',
command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES2.0 > $TARGET'
)
# generate GLES headers
gles_headers = []
......@@ -365,18 +359,6 @@ if env['gles']:
source = GLAPI + 'gen/gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -c es1 -f $SOURCE > $TARGET',
)
gles_headers += env.CodeGenerate(
target = 'main/api_exec_es2_dispatch.h',
script = GLAPI + 'gen/gl_table.py',
source = GLAPI + 'gen/gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -c es2 -m remap_table -f $SOURCE > $TARGET',
)
gles_headers += env.CodeGenerate(
target = 'main/api_exec_es2_remap_helper.h',
script = GLAPI + 'gen/remap_helper.py',
source = GLAPI + 'gen/gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -c es2 -f $SOURCE > $TARGET',
)
env.Depends(gles_sources, gles_headers)
......
api_exec_es1.c
api_exec_es2.c
dispatch.h
enums.c
get_es1.c
......@@ -8,6 +7,4 @@ git_sha1.h
git_sha1.h.tmp
api_exec_es1_dispatch.h
api_exec_es1_remap_helper.h
api_exec_es2_dispatch.h
api_exec_es2_remap_helper.h
remap_helper.h
This diff is collapsed.
......@@ -431,7 +431,7 @@ one_time_init( struct gl_context *ctx )
* when an app is linked to libGLES*, there are not enough dynamic
* entries.
*/
if (_mesa_is_desktop_gl(ctx))
if (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2)
_mesa_init_remap_table();
}
......@@ -964,9 +964,10 @@ _mesa_initialize_context(struct gl_context *ctx,
#if FEATURE_dispatch
/* setup the API dispatch tables */
switch (ctx->API) {
#if FEATURE_GL
#if FEATURE_GL || FEATURE_ES2
case API_OPENGL:
case API_OPENGL_CORE:
case API_OPENGLES2:
ctx->Exec = _mesa_create_exec_table(ctx);
break;
#endif
......@@ -974,11 +975,6 @@ _mesa_initialize_context(struct gl_context *ctx,
case API_OPENGLES:
ctx->Exec = _mesa_create_exec_table_es1();
break;
#endif
#if FEATURE_ES2
case API_OPENGLES2:
ctx->Exec = _mesa_create_exec_table_es2();
break;
#endif
default:
_mesa_problem(ctx, "unknown or unsupported API");
......
......@@ -218,8 +218,7 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
void
_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
{
if (_mesa_is_desktop_gl(ctx))
install_vtxfmt( ctx, ctx->Exec, vfmt );
install_vtxfmt( ctx, ctx->Exec, vfmt );
}
......
......@@ -6,7 +6,6 @@
# this is part of MAIN_FILES
MAIN_ES_FILES = \
$(BUILDDIR)main/api_exec_es1.c \
$(BUILDDIR)main/api_exec_es2.c \
$(SRCDIR)main/es1_conversion.c
MAIN_FILES = \
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment