Last change
on this file since 78942 was 69310, checked in by vboxsync, 7 years ago |
common/crOpenGL: scm updates
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id Revision
|
File size:
966 bytes
|
Line | |
---|
1 | # Copyright (c) 2001, Stanford University
|
---|
2 | # All rights reserved.
|
---|
3 | #
|
---|
4 | # See the file LICENSE.txt for information on redistributing this software.
|
---|
5 |
|
---|
6 | from __future__ import print_function
|
---|
7 | import sys
|
---|
8 |
|
---|
9 | import apiutil
|
---|
10 |
|
---|
11 |
|
---|
12 | apiutil.CopyrightC()
|
---|
13 |
|
---|
14 | print("""#include <stdio.h>
|
---|
15 | #include "cr_error.h"
|
---|
16 | #include "cr_string.h"
|
---|
17 | #include "cr_spu.h"
|
---|
18 | #include "passthroughspu.h"
|
---|
19 | """)
|
---|
20 |
|
---|
21 | keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
|
---|
22 |
|
---|
23 |
|
---|
24 | print('SPUNamedFunctionTable _cr_passthrough_table[%d];' % ( len(keys) + 1 ))
|
---|
25 |
|
---|
26 | print("""
|
---|
27 | static void __fillin(int offset, char *name, SPUGenericFunction func)
|
---|
28 | {
|
---|
29 | _cr_passthrough_table[offset].name = crStrdup(name);
|
---|
30 | _cr_passthrough_table[offset].fn = func;
|
---|
31 | }
|
---|
32 |
|
---|
33 | void BuildPassthroughTable( SPU *child )
|
---|
34 | {""")
|
---|
35 |
|
---|
36 | for index in range(len(keys)):
|
---|
37 | func_name = keys[index]
|
---|
38 | print('\t__fillin(%3d, "%s", (SPUGenericFunction) child->dispatch_table.%s);' % (index, func_name, func_name ))
|
---|
39 | print('\t__fillin(%3d, NULL, NULL);' % len(keys))
|
---|
40 | print('}')
|
---|
Note:
See
TracBrowser
for help on using the repository browser.