glthread: compile marshal_generated.c faster by breaking it up into 8 files

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270>
This commit is contained in:
Marek Olšák
2020-03-05 18:08:58 -05:00
parent cadddbd269
commit 8a3e2cd9b2
6 changed files with 93 additions and 25 deletions

View File

@@ -104,12 +104,13 @@ if env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
pass
# The marshal_generated.c file is generated from the GL/ES API.xml file
env.CodeGenerate(
target = 'main/marshal_generated.c',
script = GLAPI + 'gen/gl_marshal.py',
source = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml'),
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
)
for i in range(8):
env.CodeGenerate(
target = 'main/marshal_generated{0}.c'.format(i),
script = GLAPI + 'gen/gl_marshal.py',
source = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml'),
command = python_cmd + ' $SCRIPT -f $SOURCE -i {0} -n 8 > $TARGET'.format(i)
)
# The marshal_generated.h file is generated from the GL/ES API.xml file
env.CodeGenerate(