diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
commit | f8fe689a81f906d1b91bb3220acde2a4ecb14c5b (patch) | |
tree | 26484e9d7e2c67806c2d1760196ff01aaa858e8c /src/VBox/Additions/common/crOpenGL/tsfuncs.py | |
parent | Initial commit. (diff) | |
download | virtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.tar.xz virtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.zip |
Adding upstream version 6.0.4-dfsg.upstream/6.0.4-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Additions/common/crOpenGL/tsfuncs.py')
-rwxr-xr-x | src/VBox/Additions/common/crOpenGL/tsfuncs.py | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/VBox/Additions/common/crOpenGL/tsfuncs.py b/src/VBox/Additions/common/crOpenGL/tsfuncs.py new file mode 100755 index 00000000..020b5cc7 --- /dev/null +++ b/src/VBox/Additions/common/crOpenGL/tsfuncs.py @@ -0,0 +1,47 @@ +# Copyright (c) 2001, Stanford University +# All rights reserved. +# +# See the file LICENSE.txt for information on redistributing this software. + +from __future__ import print_function +import sys + +import apiutil + + +apiutil.CopyrightC() + +print(""" +/* DO NOT EDIT - THIS FILE GENERATED BY THE tsfuncs.py SCRIPT */ + +#include "stub.h" +""") + +keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt") + +for func_name in keys: + return_type = apiutil.ReturnType(func_name) + params = apiutil.Parameters(func_name) + + print("static %s SPULOAD_APIENTRY ts_%s(%s)" % (return_type, func_name, apiutil.MakeDeclarationString(params) )) + print("{") + print("\tSPUDispatchTable *tab = (SPUDispatchTable *) crGetTSD(&stub.dispatchTSD);") + + if return_type != "void": + print("\treturn ", end=" ") + + print("\ttab->%s(%s);" % (func_name, apiutil.MakeCallString(params))) + print("}") + print("") + + +print("SPUDispatchTable stubThreadsafeDispatch = {") + +for func_name in keys: + print("\tts_%s," % func_name) + +print("\tNULL, /* copyList */") +print("\tNULL, /* copy_of */") +print("\t0, /* mark */") +print("\tNULL /* server */") +print("};") |