PS2GL
OpenGL*-like API for the PS2
Loading...
Searching...
No Matches
vu1_mem_indexed.h
1
/* Copyright (C) 2000,2001,2002 Sony Computer Entertainment America
2
3
This file is subject to the terms and conditions of the GNU Lesser
4
General Public License Version 2.1. See the file "COPYING" in the
5
main directory of this archive for more details. */
6
7
// Memory looks like this:
8
//
9
// <context information>
10
// <output buffer> 18/26
11
// <first input buffer> 3/26
12
// <first color buffer> 1/26
13
// <second input buffer> 3/26
14
// <second color buffer> 1/26
15
//
16
// the output buffer needs to be about 6 times the size of the
17
// input buffers for triangles. The "color buffers" are for
18
// accumulating the lit color of each vertex, so they need to
19
// be at most 1/3 the size of the input buffers (which have 3 or 4
20
// quads per vertex). That means that if the free space is S and
21
// the size of each input buffer is x: 6x + 1x + 1/3x + 1x + 1/3x = S.
22
// x works out to be 3/26, which gives the numbers above
23
//
24
// for output = 3 * input:
25
//
26
// 3x + 1x + 1/3x + 1x + 1/3x = S
27
// x = 3/17S
28
//
29
30
// **** absolute offsets ****
31
32
#define kContextStart 0
33
34
#include "vu1_context.h"
35
36
#define kOutputBufStart (kContextStart + kContextLength)
37
#define kOutputStart kOutputBufStart
// temp
38
#define kOutputBufSize ((1024 - kOutputBufStart) * 9 / 17)
39
40
#define kOutputGeomStart (kOutputBufStart + 1)
// 1 quad for giftag
41
42
#define kDoubleBufBase (kOutputBufStart + kOutputBufSize)
43
#define kDoubleBufOffset ((1024 - kDoubleBufBase) / 2)
44
#define kDoubleBufSize kDoubleBufOffset
45
46
#define kInputBufSize ((1024 - kOutputBufStart) * 3 / 17)
47
48
// **** buffer-relative offsets ****
49
50
// input buffer
51
52
#define kNumVertices 0
// x field
53
#define kNumIndicesD2 0
// y field
54
#define kNumIndices 0
// z field
55
#define kStripADCs (kNumVertices + 1)
56
#define kInputGeomStart (kStripADCs + 4)
57
#define kInputStart kInputGeomStart
// temp
58
59
#define kTempAreaStart (kInputGeomStart + kInputBufSize)
vu1
vu1_mem_indexed.h
Generated on Wed Mar 19 2025 19:24:03 for PS2GL by
1.12.0