param.c 3.2 KB
/**************************************************************************
 *                                                                        *
 *               Copyright (C) 1995, Silicon Graphics, Inc.               *
 *                                                                        *
 *  These coded instructions, statements, and computer programs  contain  *
 *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
 *  are protected by Federal copyright  law.  They  may not be disclosed  *
 *  to  third  parties  or copied or duplicated in any form, in whole or  *
 *  in part, without the prior written consent of Silicon Graphics, Inc.  *
 *                                                                        *
 *************************************************************************/

/*
 * param.c
 *
 * Table of sprite parameter scenarios that can be stepped through by
 * triggering the controller.
 */

#include "spbench.h"

#include "ball16x16x8.h"

#include "ball32x16x4.h"

#include "ball32x32x2.h"

#include "ball64x32.h"


paramData paramTable[] = {
    { ball16x16x8, 16, 16, 8, 16, 16,
			4<<10, 1<<10, G_CYC_COPY,   64, 2640, 2640 },

    { ball16x16x8, 16, 16, 8, 16, 16,
			4<<10, 1<<10, G_CYC_COPY,    1, 2170, 2170 },

    { ball16x16x8, 16, 16, 8, 16, 16,
			1<<10, 1<<10, G_CYC_1CYCLE,  1, 2000, 2000 },

    { ball32x16x4, 32, 16, 4, 32, 16,
			4<<10, 1<<10, G_CYC_COPY,    1, 1610, 1610 },

    { ball32x16x4, 32, 16, 4, 32, 16,
			1<<10, 1<<10, G_CYC_1CYCLE,  1, 1330, 1330 },

    { ball16x16x8, 16, 32, 4, 16, 32,
			4<<10, 1<<10, G_CYC_COPY,    1, 1140, 1140 },

    { ball16x16x8, 16, 32, 4, 16, 32,
			1<<10, 1<<10, G_CYC_1CYCLE,  1, 1050, 1050 },

    { ball32x32x2, 32, 32, 2, 32, 32,
			4<<10, 1<<10, G_CYC_COPY,    1,  830,  830 },

    { ball16x16x8, 16, 16, 8, 32, 32,
			1<<9,  1<<9,  G_CYC_1CYCLE,  1,  700,  700 },

    { ball32x32x2, 32, 32, 2, 32, 32,
			1<<10,  1<<10, G_CYC_1CYCLE, 1,  680,  680 },

    { ball64x32,   64, 32, 1, 64, 32,
			4<<10, 1<<10, G_CYC_COPY,    1,  530,  530 },

    { ball32x16x4, 32, 16, 4, 64, 32,
			1<<9,  1<<9,  G_CYC_1CYCLE,  1,  400,  400 },

    { ball64x32,   64, 32, 1, 64, 32,
			1<<10, 1<<10, G_CYC_1CYCLE,  1,  390,  390 },

    { ball32x32x2, 32, 64, 1, 32, 64,
			4<<10, 1<<10, G_CYC_COPY,    1,  420,  420 },

    { ball16x16x8, 16, 32, 4, 32, 64,
			1<<9,  1<<9,  G_CYC_1CYCLE,  1,  350,  350 },

    { ball16x16x8, 16, 16, 8, 64, 64,
			1<<8,  1<<8,  G_CYC_1CYCLE,  1,  200,  200 },

    { ball32x32x2, 32, 32, 2, 64, 64,
			1<<9,   1<<9,  G_CYC_1CYCLE, 1,  200,  200 },

};

paramData *endParamTable = &paramTable[sizeof(paramTable)/sizeof(paramData)];
paramData *currentParam = &paramTable[0];

/*
 * printCurrentParam
 *
 * Print current sprite parameter settings.
 */
void
printCurrentParam(void)
{
    osSyncPrintf("sprite size (%dx%d) texture size (%dx%d) %s mode %s\n",
		currentParam->spriteSizeX, currentParam->spriteSizeY,
		currentParam->textureSizeX, currentParam->textureSizeY,
		currentParam->cycleType == G_CYC_COPY ? "copy" : "1 cycle",
		currentParam->alignment == 1 ? "" : "aligned");

    osSyncPrintf("number of sprites (%d) reload texture after (%d) draws\n\n",
		currentParam->numSprites, currentParam->loadFactor);
}