mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
mesa/es: Switch to APIspec.xml.
Update Makefile and ES generator to use APIspec.xml. Remove APIspec.txt and related files. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
parent
0c1a7bbe0d
commit
8264a6a8a6
6 changed files with 8 additions and 4117 deletions
|
|
@ -87,11 +87,11 @@ GENERATED_SOURCES := \
|
|||
main/get_es1.c \
|
||||
main/get_es2.c
|
||||
|
||||
main/api_exec_es1.c: main/APIspec.txt main/es_generator.py main/apiutil.py main/es1_special
|
||||
$(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.txt -V GLES1.1 > $@
|
||||
main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@
|
||||
|
||||
main/api_exec_es2.c: main/APIspec.txt main/es_generator.py main/apiutil.py main/es2_special
|
||||
$(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.txt -V GLES2.0 > $@
|
||||
main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@
|
||||
|
||||
main/get_es1.c: main/get_gen.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< 1 > $@
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +0,0 @@
|
|||
# GetString is always special.
|
||||
GetString
|
||||
# CompressedTexImage2D calls out to two different functions based on
|
||||
# whether the image is a paletted image or not
|
||||
CompressedTexImage2D
|
||||
# QueryMatrixx returns values in an unusual, decomposed, fixed-value
|
||||
# form; it has its own code for this
|
||||
QueryMatrixx
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# GetString must always have its own implementation, so we return our
|
||||
# implementation values instead of Mesa's.
|
||||
GetString
|
||||
CompressedTexImage2D
|
||||
RenderbufferStorage
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
import sys, os
|
||||
import apiutil
|
||||
import APIspecutil as apiutil
|
||||
|
||||
# These dictionary entries are used for automatic conversion.
|
||||
# The string will be used as a format string with the conversion
|
||||
|
|
@ -142,19 +142,16 @@ def GetFormatString(type):
|
|||
# Version-specific values to be used in the main script
|
||||
# header: which header file to include
|
||||
# api: what text specifies an API-level function
|
||||
# special: the name of the "specials" file
|
||||
VersionSpecificValues = {
|
||||
'GLES1.1' : {
|
||||
'description' : 'GLES1.1 functions',
|
||||
'header' : 'GLES/gl.h',
|
||||
'extheader' : 'GLES/glext.h',
|
||||
'special' : 'es1_special',
|
||||
},
|
||||
'GLES2.0': {
|
||||
'description' : 'GLES2.0 functions',
|
||||
'header' : 'GLES2/gl2.h',
|
||||
'extheader' : 'GLES2/gl2ext.h',
|
||||
'special' : 'es2_special',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -166,13 +163,9 @@ VersionSpecificValues = {
|
|||
# error messages.
|
||||
program = os.path.basename(sys.argv[0])
|
||||
|
||||
# We assume that the directory that the Python script is in also
|
||||
# houses the "special" files.
|
||||
programDir = os.path.dirname(sys.argv[0])
|
||||
|
||||
# Set default values
|
||||
verbose = 0
|
||||
functionList = "APIspec.txt"
|
||||
functionList = "APIspec.xml"
|
||||
version = "GLES1.1"
|
||||
|
||||
# Allow for command-line switches
|
||||
|
|
@ -215,17 +208,6 @@ if not VersionSpecificValues.has_key(version):
|
|||
# Grab the version-specific items we need to use
|
||||
versionHeader = VersionSpecificValues[version]['header']
|
||||
versionExtHeader = VersionSpecificValues[version]['extheader']
|
||||
versionSpecial = VersionSpecificValues[version]['special']
|
||||
|
||||
# We're probably being invoked from a different directory,
|
||||
# so look for the "special" file in the same directory that
|
||||
# holds the Python script
|
||||
specialFile = os.path.join(programDir, versionSpecial)
|
||||
if not os.path.isfile(specialFile):
|
||||
sys.stderr.write("%s: can't find special file '%s' for version '%s' - aborting" % (program, specialFile, version))
|
||||
sys.exit(1)
|
||||
|
||||
allSpecials = apiutil.AllSpecials(specialFile.split("_")[0])
|
||||
|
||||
# If we get to here, we're good to go. The "version" parameter
|
||||
# directs GetDispatchedFunctions to only allow functions from
|
||||
|
|
@ -235,6 +217,8 @@ allSpecials = apiutil.AllSpecials(specialFile.split("_")[0])
|
|||
# GLES1 and GLES2).
|
||||
keys = apiutil.GetAllFunctions(functionList, version)
|
||||
|
||||
allSpecials = apiutil.AllSpecials()
|
||||
|
||||
print """/* DO NOT EDIT *************************************************
|
||||
* THIS FILE AUTOMATICALLY GENERATED BY THE %s SCRIPT
|
||||
* API specification file: %s
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue