blob: 5feed9a98f903544abd9af1564b4efdc5f868d5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# 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 AUTOMATICALLY GENERATED BY packspu_proto.py SCRIPT */
#ifndef PACKSPU_FUNCTIONS_H
#define PACKSPU_FUNCTIONS_H 1
#include <stdio.h>
#include "cr_string.h"
#include "cr_spu.h"
#include "packspu.h"
#include "cr_packfunctions.h"
""")
pack_specials = []
keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
# make list of special functions
for func_name in keys:
if ("get" in apiutil.Properties(func_name) or
apiutil.FindSpecial( "packspu", func_name ) or
apiutil.FindSpecial( "packspu_flush", func_name ) or
apiutil.FindSpecial( "packspu_vertex", func_name )):
pack_specials.append( func_name )
for func_name in keys:
if apiutil.FindSpecial( "packspu_unimplemented", func_name ):
continue
if func_name in pack_specials:
return_type = apiutil.ReturnType(func_name)
params = apiutil.Parameters(func_name)
print('extern %s PACKSPU_APIENTRY packspu_%s(%s);' % ( return_type, func_name, apiutil.MakeDeclarationString(params) ))
print("""
#endif
""")
|