From 1cc98f5a48924d750fbef7ea6b05a1ba49c28589 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 5 Nov 2012 07:36:16 +0100 Subject: xserver mesa xkbcomp git update 5 nov 2012 xserver: a194630f7f7b287cb4ea4a459df0745f4c0d4c1a mesa: ccbfe3dde94cd50a4e6468cfeabf95c79c9d8072 xkbcomp: a68c5b7b29eb1433b1be73b50c4248e10eab8e64 --- mesalib/src/mesa/Android.gen.mk | 33 +- mesalib/src/mesa/Makefile.am | 15 - mesalib/src/mesa/SConscript | 18 - mesalib/src/mesa/main/.gitignore | 3 - mesalib/src/mesa/main/APIspec.py | 617 --------- mesalib/src/mesa/main/APIspec.xml | 2383 -------------------------------- mesalib/src/mesa/main/APIspecutil.py | 272 ---- mesalib/src/mesa/main/api_exec.c | 260 ++-- mesalib/src/mesa/main/api_exec.h | 6 - mesalib/src/mesa/main/api_loopback.c | 9 +- mesalib/src/mesa/main/arrayobj.c | 2 +- mesalib/src/mesa/main/bufferobj.c | 24 +- mesalib/src/mesa/main/context.c | 27 +- mesalib/src/mesa/main/dlist.c | 12 +- mesalib/src/mesa/main/es1_conversion.c | 4 - mesalib/src/mesa/main/es1_conversion.h | 31 + mesalib/src/mesa/main/es_generator.py | 765 ---------- mesalib/src/mesa/main/fbobject.c | 21 - mesalib/src/mesa/main/fbobject.h | 9 - mesalib/src/mesa/main/querymatrix.c | 13 +- mesalib/src/mesa/main/querymatrix.h | 39 + mesalib/src/mesa/main/queryobj.c | 16 +- mesalib/src/mesa/main/shaderapi.c | 76 +- mesalib/src/mesa/main/texgen.c | 10 +- mesalib/src/mesa/main/texgen.h | 2 +- mesalib/src/mesa/main/texobj.c | 2 +- mesalib/src/mesa/main/uniforms.c | 52 +- mesalib/src/mesa/main/vtxfmt.c | 51 +- mesalib/src/mesa/sources.mak | 1 - mesalib/src/mesa/swrast/s_texfetch.c | 2 +- 30 files changed, 407 insertions(+), 4368 deletions(-) delete mode 100644 mesalib/src/mesa/main/APIspec.py delete mode 100644 mesalib/src/mesa/main/APIspec.xml delete mode 100644 mesalib/src/mesa/main/APIspecutil.py delete mode 100644 mesalib/src/mesa/main/es_generator.py create mode 100644 mesalib/src/mesa/main/querymatrix.h (limited to 'mesalib/src/mesa') diff --git a/mesalib/src/mesa/Android.gen.mk b/mesalib/src/mesa/Android.gen.mk index 893fa4199..ffa36db4d 100644 --- a/mesalib/src/mesa/Android.gen.mk +++ b/mesalib/src/mesa/Android.gen.mk @@ -32,9 +32,6 @@ intermediates := $(call local-intermediates-dir) # This is the list of auto-generated files: sources and headers sources := \ main/enums.c \ - main/api_exec_es1.c \ - main/api_exec_es1_dispatch.h \ - main/api_exec_es1_remap_helper.h \ program/program_parse.tab.c \ program/lex.yy.c \ main/dispatch.h \ @@ -60,13 +57,7 @@ LOCAL_GENERATED_SOURCES += $(sources) glapi := $(MESA_TOP)/src/mapi/glapi/gen -es_src_deps := \ - $(LOCAL_PATH)/main/APIspec.xml \ - $(LOCAL_PATH)/main/es_generator.py \ - $(LOCAL_PATH)/main/APIspecutil.py \ - $(LOCAL_PATH)/main/APIspec.py - -es_hdr_deps := \ +dispatch_deps := \ $(wildcard $(glapi)/*.py) \ $(wildcard $(glapi)/*.xml) @@ -88,22 +79,6 @@ define es-gen $(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@ endef -$(intermediates)/main/api_exec_%.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/main/es_generator.py -$(intermediates)/main/api_exec_%.c: PRIVATE_XML := -S $(LOCAL_PATH)/main/APIspec.xml -$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_table.py -$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/remap_helper.py -$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml - -$(intermediates)/main/api_exec_es1.c: $(es_src_deps) - $(call es-gen, -V GLES1.1) - -$(intermediates)/main/api_exec_%_dispatch.h: $(es_hdr_deps) - $(call es-gen, -c $* -m remap_table) - -$(intermediates)/main/api_exec_%_remap_helper.h: $(es_hdr_deps) - $(call es-gen, -c $*) - $(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program/program_parse.y $(mesa_local-y-to-c-and-h) @@ -133,19 +108,19 @@ $(intermediates)/x86/matypes.h: $(matypes_deps) $(intermediates)/main/dispatch.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_table.py $(intermediates)/main/dispatch.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -$(intermediates)/main/dispatch.h: $(es_hdr_deps) +$(intermediates)/main/dispatch.h: $(dispatch_deps) $(call es-gen, $* -m remap_table) $(intermediates)/main/remap_helper.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/remap_helper.py $(intermediates)/main/remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -$(intermediates)/main/remap_helper.h: $(es_hdr_deps) +$(intermediates)/main/remap_helper.h: $(dispatch_deps) $(call es-gen, $*) $(intermediates)/main/enums.c: PRIVATE_SCRIPT :=$(MESA_PYTHON2) $(glapi)/gl_enums.py $(intermediates)/main/enums.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -$(intermediates)/main/enums.c: $(es_src_deps) +$(intermediates)/main/enums.c: $(dispatch_deps) $(call es-gen) GET_HASH_GEN := $(LOCAL_PATH)/main/get_hash_generator.py diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am index 1dc3132c7..1f897257e 100644 --- a/mesalib/src/mesa/Makefile.am +++ b/mesalib/src/mesa/Makefile.am @@ -53,9 +53,6 @@ include $(GLAPI)/glapi_gen.mk BUILT_SOURCES = \ main/git_sha1.h \ - main/api_exec_es1_dispatch.h \ - main/api_exec_es1_remap_helper.h \ - main/api_exec_es1.c \ main/get_hash.h \ program/program_parse.tab.c \ program/program_parse.tab.h \ @@ -64,18 +61,6 @@ CLEANFILES = \ $(BUILT_SOURCES) \ git_sha1.h.tmp -main/api_exec_es1_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps) - $(call glapi_gen_dispatch,$<,es1) - -main/api_exec_es1_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps) - $(call glapi_gen_remap,$<,es1) - -main/api_exec_es1.o: main/api_exec_es1_dispatch.h main/api_exec_es1_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 > $@ - program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y $(MKDIR_P) program $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program/program_parse.tab.c $< diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript index 12bb70aec..53e5ee8c2 100644 --- a/mesalib/src/mesa/SConscript +++ b/mesalib/src/mesa/SConscript @@ -339,27 +339,9 @@ if env['gles']: # generate GLES sources gles_sources = ['main/es1_conversion.c',] - gles_sources += env.CodeGenerate( - target = 'main/api_exec_es1.c', - script = 'main/es_generator.py', - source = 'main/APIspec.xml', - command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES1.1 > $TARGET' - ) # generate GLES headers gles_headers = [] - gles_headers += env.CodeGenerate( - target = 'main/api_exec_es1_dispatch.h', - script = GLAPI + 'gen/gl_table.py', - source = GLAPI + 'gen/gl_and_es_API.xml', - command = python_cmd + ' $SCRIPT -c es1 -m remap_table -f $SOURCE > $TARGET', - ) - gles_headers += env.CodeGenerate( - target = 'main/api_exec_es1_remap_helper.h', - script = GLAPI + 'gen/remap_helper.py', - source = GLAPI + 'gen/gl_and_es_API.xml', - command = python_cmd + ' $SCRIPT -c es1 -f $SOURCE > $TARGET', - ) env.Depends(gles_sources, gles_headers) diff --git a/mesalib/src/mesa/main/.gitignore b/mesalib/src/mesa/main/.gitignore index 29ebf8df4..4115a9b2b 100644 --- a/mesalib/src/mesa/main/.gitignore +++ b/mesalib/src/mesa/main/.gitignore @@ -1,12 +1,9 @@ -api_exec_es1.c dispatch.h enums.c get_es1.c get_es2.c git_sha1.h git_sha1.h.tmp -api_exec_es1_dispatch.h -api_exec_es1_remap_helper.h remap_helper.h get_hash.h get_hash.h.tmp diff --git a/mesalib/src/mesa/main/APIspec.py b/mesalib/src/mesa/main/APIspec.py deleted file mode 100644 index 6947f7301..000000000 --- a/mesalib/src/mesa/main/APIspec.py +++ /dev/null @@ -1,617 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2009 Chia-I Wu -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -""" -A parser for APIspec. -""" - -class SpecError(Exception): - """Error in the spec file.""" - - -class Spec(object): - """A Spec is an abstraction of the API spec.""" - - def __init__(self, doc): - self.doc = doc - - self.spec_node = doc.getRootElement() - self.tmpl_nodes = {} - self.api_nodes = {} - self.impl_node = None - - # parse - node = self.spec_node.children - while node: - if node.type == "element": - if node.name == "template": - self.tmpl_nodes[node.prop("name")] = node - elif node.name == "api": - self.api_nodes[node.prop("name")] = node - else: - raise SpecError("unexpected node %s in apispec" % - node.name) - node = node.next - - # find an implementation - for name, node in self.api_nodes.iteritems(): - if node.prop("implementation") == "true": - self.impl_node = node - break - if not self.impl_node: - raise SpecError("unable to find an implementation") - - def get_impl(self): - """Return the implementation.""" - return API(self, self.impl_node) - - def get_api(self, name): - """Return an API.""" - return API(self, self.api_nodes[name]) - - -class API(object): - """An API consists of categories and functions.""" - - def __init__(self, spec, api_node): - self.name = api_node.prop("name") - self.is_impl = (api_node.prop("implementation") == "true") - - self.categories = [] - self.functions = [] - - # parse - func_nodes = [] - node = api_node.children - while node: - if node.type == "element": - if node.name == "category": - cat = node.prop("name") - self.categories.append(cat) - elif node.name == "function": - func_nodes.append(node) - else: - raise SpecError("unexpected node %s in api" % node.name) - node = node.next - - # realize functions - for func_node in func_nodes: - tmpl_node = spec.tmpl_nodes[func_node.prop("template")] - try: - func = Function(tmpl_node, func_node, self.is_impl, - self.categories) - except SpecError, e: - func_name = func_node.prop("name") - raise SpecError("failed to parse %s: %s" % (func_name, e)) - self.functions.append(func) - - def match(self, func, conversions={}): - """Find a matching function in the API.""" - match = None - need_conv = False - for f in self.functions: - matched, conv = f.match(func, conversions) - if matched: - match = f - need_conv = conv - # exact match - if not need_conv: - break - return (match, need_conv) - - -class Function(object): - """Parse and realize a