Changeset 21310 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Jul 7, 2009 10:52:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/packer/pack_swap.py
r21306 r21310 36 36 the_index = min( min( paren_index, space_index ), quote_index ) 37 37 print "%sSWAP%s" % (line[:the_index], line[the_index:]) 38 elif line.find("WRITE_DATA_AI") != -1: 39 lparen_index = line.find( "(" ) 40 rparen_index = line.rfind( ")" ) 41 args = map( string.strip, line[lparen_index+1:rparen_index].split( "," ) ) 42 indentation = line[:line.find( "WRITE_DATA_AI" )] 43 if apiutil.sizeof(args[0]) == 1: 44 print "%sWRITE_DATA_AI(%s, %s);" % (indentation, args[0], args[1]) 45 elif apiutil.sizeof(args[0]) == 2: 46 print "%sWRITE_DATA_AI(%s, SWAP16(%s) );" % (indentation, args[0], args[1]) 47 elif args[0] == 'GLfloat' or args[0] == 'GLclampf': 48 print "%sWRITE_DATA_AI(GLuint, SWAPFLOAT(%s) );" % (indentation, args[0]) 49 elif apiutil.sizeof(args[0]) == 4: 50 print "%sWRITE_DATA_AI(%s, SWAP32(%s) );" % (indentation, args[0], args[1]) 51 else: 52 print >> sys.stderr, "UNKNOWN TYPE FOR WRITE_DATA: %s" % args[1] 53 sys.exit(-1) 38 54 elif line.find( "WRITE_DATA" ) != -1: 39 55 lparen_index = line.find( "(" )
Note:
See TracChangeset
for help on using the changeset viewer.