summaryrefslogtreecommitdiff
path: root/src/mapi
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2018-11-20 17:44:43 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2019-01-24 18:13:25 +0000
commit3bf08292d2278e06edc73a7a3e29c8f44c8dfa53 (patch)
tree871005a27b3ea38b5cc5b031b2b4a29cce456f0d /src/mapi
parent0842bc879b34414de54be9a2299ea8cdb0ecde5e (diff)
scons: wire the new generator for es1 and es2
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/shared-glapi/SConscript28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/mapi/shared-glapi/SConscript b/src/mapi/shared-glapi/SConscript
index 060c61dadcef..81aea74873d4 100644
--- a/src/mapi/shared-glapi/SConscript
+++ b/src/mapi/shared-glapi/SConscript
@@ -27,13 +27,27 @@ def mapi_objects(env, printer, mode):
# generate ABI header
GLAPI = '../glapi/'
- header = env.CodeGenerate(
- target = header_name,
- script = '../mapi_abi.py',
- source = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml'),
- command = python_cmd + ' $SCRIPT ' + \
- '--printer %s $SOURCE > $TARGET' % (printer),
- )
+ if printer != 'glapi':
+ if printer == 'es1api':
+ abi_tag = 'glesv1'
+ else:
+ abi_tag = 'glesv2'
+
+ header = env.CodeGenerate(
+ target = header_name,
+ script = '../new/gen_gldispatch_mapi.py',
+ source = GLAPI + 'registry/gl.xml'
+ command = python_cmd + ' $SCRIPT ' + \
+ '%s $SOURCE > $TARGET' % (abi_tag),
+ )
+ else:
+ header = env.CodeGenerate(
+ target = header_name,
+ script = '../mapi_abi.py',
+ source = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml'),
+ command = python_cmd + ' $SCRIPT ' + \
+ '--printer %s $SOURCE > $TARGET' % (printer),
+ )
cpppath = [
header[0].dir,