# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
import apiutil
print """
/* DO NOT EDIT - this file generated by packspu_flush.py script */
/* These are otherwise ordinary functions which require that the buffer be
* flushed immediately after packing the function.
*/
#include "cr_glstate.h"
#include "cr_packfunctions.h"
#include "packspu.h"
#include "packspu_proto.h"
"""
print 'void PACKSPU_APIENTRY packspu_%s( %s )' % ( func_name, apiutil.MakeDeclarationString(params))
print '{'
print '\tGET_THREAD(thread);'
print '\tif (pack_spu.swap)'
print '\t{'
print '\t}'
print '\telse'
print '\t{'
print '\t}'
print '\tpackspuFlush( (void *) thread );'
print '}\n'