dump_gen.py revision 81578c6df6541d965dcfe32dd0e0decb64a42284
import sys
import apiutil
params = {}
extended_params = {}
if match:
if match:
print """#include "cr_blitter.h"
#include "cr_spu.h"
#include "chromium.h"
#include "cr_error.h"
#include "cr_net.h"
#include "cr_rand.h"
#include "cr_mem.h"
#include "cr_string.h"
#include <cr_dump.h>
#include "cr_pixeldata.h"
#include <stdio.h>
#ifdef VBOX_WITH_CRDUMPER
"""
from get_sizes import *;
print """
static void crRecDumpPrintVal(CR_DUMPER *pDumper, struct nv_struct *pDesc, float *pfData)
{
char aBuf[4096];
crDmpFormatArrayf(aBuf, sizeof (aBuf), pfData, pDesc->num_values);
crDmpStrF(pDumper, "%s = %s;", pDesc->pszName, aBuf);
}
void crRecDumpGlGetState(CR_RECORDER *pRec, CRContext *ctx)
{
float afData[CR_MAX_GET_VALUES];
struct nv_struct *pDesc;
for (pDesc = num_values_array; pDesc->num_values != 0 ; pDesc++)
{
memset(afData, 0, sizeof(afData));
pRec->pDispatch->GetFloatv(pDesc->pname, afData);
crRecDumpPrintVal(pRec->pDumper, pDesc, afData);
}
}
void crRecDumpGlEnableState(CR_RECORDER *pRec, CRContext *ctx)
{
GLboolean fEnabled;
"""
print "\tfEnabled = pRec->pDispatch->IsEnabled(%s);" % pname
print "\tcrDmpStrF(pRec->pDumper, \"%s = %%d;\", fEnabled);" % pname
print '#ifdef CR_%s' % ext
print "\tfEnabled = pRec->pDispatch->IsEnabled(%s);" % pname
print "\tcrDmpStrF(pRec->pDumper, \"%s = %%d;\", fEnabled);" % pname
print '#endif /* CR_%s */' % ext
print """
}
#endif
"""