VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_flush.py@ 70085

Last change on this file since 70085 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: 1.2 KB
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
6from __future__ import print_function
7import sys
8
9import apiutil
10
11
12apiutil.CopyrightC()
13
14print("""
15/* DO NOT EDIT - this file generated by packspu_flush.py script */
16
17/* These are otherwise ordinary functions which require that the buffer be
18 * flushed immediately after packing the function.
19 */
20#include "cr_glstate.h"
21#include "cr_packfunctions.h"
22#include "packspu.h"
23#include "packspu_proto.h"
24""")
25
26keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
27
28for func_name in apiutil.AllSpecials( "packspu_flush" ):
29 params = apiutil.Parameters(func_name)
30 print('void PACKSPU_APIENTRY packspu_%s(%s)' % ( func_name, apiutil.MakeDeclarationString(params)))
31 print('{')
32 print('\tGET_THREAD(thread);')
33 print('\tif (pack_spu.swap)')
34 print('\t{')
35 print('\t\tcrPack%sSWAP(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
36 print('\t}')
37 print('\telse')
38 print('\t{')
39 print('\t\tcrPack%s(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
40 print('\t}')
41 print('\tpackspuFlush( (void *) thread );')
42 print('}\n')
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette