param.c
3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/**************************************************************************
* *
* 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 = ¶mTable[sizeof(paramTable)/sizeof(paramData)];
paramData *currentParam = ¶mTable[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);
}