PSPSDK 2025-08-13
Loading...
Searching...
No Matches
guInternal.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * Copyright (c) 2005 Jesper Svennevid
7 */
8
9#ifndef __guInternal_h__
10#define __guInternal_h__
11
12#include "pspgu.h"
13
14#ifdef GU_DEBUG
15#include <assert.h>
16#include <stdio.h>
17#endif
18
19#define GU_OBJECT_STACK_SIZE 32
20
21typedef void (*GuCallback)(int);
22
35
36typedef struct
37{
38 unsigned int *start;
39 unsigned int *current;
42
43typedef struct
44{
47 int scissor_start[2];
48 int scissor_end[2];
56 int sprite_mode[4];
57 unsigned int clear_color;
58 unsigned int clear_stencil;
59 unsigned int clear_depth;
61} GuContext;
62
63typedef struct
64{
71 int width;
72 int height;
74
75extern GuContext gu_contexts[3];
76extern int ge_list_executed[2];
77extern void *ge_edram_address;
80extern int gu_curr_context;
81extern int gu_init;
82extern int gu_first_start;
83extern int gu_display_on;
84extern int gu_call_mode;
85extern int gu_states;
87
88extern unsigned int *gu_object_stack[];
89extern int gu_object_stack_depth;
90
91void callbackSig(int id, void *arg);
92void callbackFin(int id, void *arg);
93
94typedef enum GECommand
95{
96 /* No operation */
97 NOP = 0x0,
98 /* Vertex data */
99 VADDR = 0x1,
100 /* Index data */
101 IADDR = 0x2,
102 /* Draw Primitive */
103 PRIM = 0x4,
104 /* Draw Bezier surface */
105 BEZIER = 0x5,
106 /* Draw Spline surface */
107 SPLINE = 0x6,
108 /* Bounding Box */
110 /* Jump */
111 JUMP = 0x8,
112 /* Conditional Jump */
113 BJUMP = 0x9,
114 /* List Call */
115 CALL = 0xa,
116 /* List Return */
117 RET = 0xb,
118 /* End reading */
119 END = 0xc,
120 /* Signal interrupt */
121 SIGNAL = 0xe,
122 /* Finish drawing */
123 FINISH = 0xf,
124 /* Address base */
125 BASE = 0x10,
126 /* Vertex type */
127 VERTEX_TYPE = 0x12,
128 /* Offset address */
129 OFFSET_ADDR = 0x13,
130 /* Origin address */
131 ORIGIN = 0x14,
132 /* Drawing region 1, origin */
133 REGION1 = 0x15,
134 /* Drawing region 2, end */
135 REGION2 = 0x16,
136
137 /* Lighting enable */
139 /* Light 0 enable */
141 /* Light 1 enable */
143 /* Light 2 enable */
145 /* Light 3 enable */
147 /* Clipping enable */
149 /* Culling enable */
151 /* Texture mapping enable */
153 /* Fog enable */
154 FOG_ENABLE = 0x1f,
155 /* Dithering enable */
157 /* Alpha blending enable */
159 /* Alpha testing enable */
161 /* Z testing enable */
163 /* Stencil testing enable */
165 /* Anti-aliasing enable */
167 /* Patch culling enable */
169 /* Color testing enable */
171 /* Logical operation enable */
173
174 /* Bone matrix number */
176 /* Bone matrix data */
178 /* Morph weight 0 */
180 /* Morph weight 1 */
182 /* Morph weight 2 */
184 /* Morph weight 3 */
186 /* Morph weight 4 */
188 /* Morph weight 5 */
190 /* Morph weight 6 */
192 /* Morph weight 7 */
194
195 /* Patch division count */
197 /* Patch primitive type */
199 /* Patch facing */
201 /* World matrix number */
203 /* World matrix data */
205 /* View matrix number */
207 /* View matrix data */
209 /* Projection matrix number */
211 /* Projection matrix data */
213 /* Texture generation matrix number */
215 /* Texture generation matrix data */
217
218 /* Viewport X scale */
220 /* Viewport Y scale */
222 /* Viewport Z scale */
224 /* Viewport X center */
226 /* Viewport Y center */
228 /* Viewport Z center */
230 /* Texture scale U */
231 TEX_SCALE_U = 0x48,
232 /* Texture scale V */
233 TEX_SCALE_V = 0x49,
234 /* Texture offset U */
236 /* Texture offset V */
238 /* Screen Offset X */
239 OFFSET_X = 0x4c,
240 /* Screen Offset Y */
241 OFFSET_Y = 0x4d,
242
243 /* Shade mode */
244 SHADE_MODE = 0x50,
245 /* Normal reverse */
247 /* Material color */
249 /* Material emissive */
251 /* Ambient color */
253 /* Material diffuse */
255 /* Material specular */
257 /* Ambient alpha */
259 /* Material specular coefficient */
261 /* Ambient light color */
263 /* Ambient light alpha */
265 /* Light mode */
266 LIGHT_MODE = 0x5e,
267
268 /* Light type 0 */
269 LIGHT_TYPE0 = 0x5f,
270 /* Light type 1 */
271 LIGHT_TYPE1 = 0x60,
272 /* Light type 2 */
273 LIGHT_TYPE2 = 0x61,
274 /* Light type 3 */
275 LIGHT_TYPE3 = 0x62,
276 /* Light 0 X */
277 LIGHT0_X = 0x63,
278 /* Light 0 Y */
279 LIGHT0_Y = 0x64,
280 /* Light 0 Z */
281 LIGHT0_Z = 0x65,
282 /* Light 1 X */
283 LIGHT1_X = 0x66,
284 /* Light 1 Y */
285 LIGHT1_Y = 0x67,
286 /* Light 1 Z */
287 LIGHT1_Z = 0x68,
288 /* Light 2 X */
289 LIGHT2_X = 0x69,
290 /* Light 2 Y */
291 LIGHT2_Y = 0x6a,
292 /* Light 2 Z */
293 LIGHT2_Z = 0x6b,
294 /* Light 3 X */
295 LIGHT3_X = 0x6c,
296 /* Light 3 Y */
297 LIGHT3_Y = 0x6d,
298 /* Light 3 Z */
299 LIGHT3_Z = 0x6e,
300
301 /* Light 0 direction X */
303 /* Light 0 direction Y */
305 /* Light 0 direction Z */
307 /* Light 1 direction X */
309 /* Light 1 direction Y */
311 /* Light 1 direction Z */
313 /* Light 2 direction X */
315 /* Light 2 direction Y */
317 /* Light 2 direction Z */
319 /* Light 3 direction X */
321 /* Light 3 direction Y */
323 /* Light 3 direction Z */
325
326 /* Light 0 constant attenuation */
328 /* Light 0 linear attenuation */
330 /* Light 0 quadratic attenuation */
332 /* Light 1 constant attenuation */
334 /* Light 1 linear attenuation */
336 /* Light 1 quadratic attenuation */
338 /* Light 2 constant attenuation */
340 /* Light 2 linear attenuation */
342 /* Light 2 quadratic attenuation */
344 /* Light 3 constant attenuation */
346 /* Light 3 linear attenuation */
348 /* Light 3 quadratic attenuation */
350
351 /* Light 0 exponent attenuation */
353 /* Light 1 exponent attenuation */
355 /* Light 2 exponent attenuation */
357 /* Light 3 exponent attenuation */
359
360 /* Light 0 cutoff attenuation */
362 /* Light 1 cutoff attenuation */
364 /* Light 2 cutoff attenuation */
366 /* Light 3 cutoff attenuation */
368
369 /* Light 0 ambient */
371 /* Light 0 diffuse */
373 /* Light 0 specular */
375 /* Light 1 ambient */
377 /* Light 1 diffuse */
379 /* Light 1 specular */
381 /* Light 2 ambient */
383 /* Light 2 diffuse */
385 /* Light 2 specular */
387 /* Light 3 ambient */
389 /* Light 3 diffuse */
391 /* Light 3 specular */
393
394 /* Culling */
395 CULL = 0x9b,
396
397 /* Frame buffer pointer */
399 /* Frame buffer width */
401 /* Z buffer pointer */
402 Z_BUF_PTR = 0x9e,
403 /* Z buffer width */
404 Z_BUF_WIDTH = 0x9f,
405
406 /* Texture address 0 */
407 TEX_ADDR0 = 0xa0,
408 /* Texture address 1 */
409 TEX_ADDR1 = 0xa1,
410 /* Texture address 2 */
411 TEX_ADDR2 = 0xa2,
412 /* Texture address 3 */
413 TEX_ADDR3 = 0xa3,
414 /* Texture address 4 */
415 TEX_ADDR4 = 0xa4,
416 /* Texture address 5 */
417 TEX_ADDR5 = 0xa5,
418 /* Texture address 6 */
419 TEX_ADDR6 = 0xa6,
420 /* Texture address 7 */
421 TEX_ADDR7 = 0xa7,
422 /* Texture buffer width 0 */
424 /* Texture buffer width 1 */
426 /* Texture buffer width 2 */
428 /* Texture buffer width 3 */
430 /* Texture buffer width 4 */
432 /* Texture buffer width 5 */
434 /* Texture buffer width 6 */
436 /* Texture buffer width 7 */
438
439 /* CLUT buffer pointer */
441 /* CLUT buffer width */
443
444 /* Transfer source */
446 /* Transfer source width */
448 /* Transfer destination */
450 /* Transfer destination width */
452
453 /* Texture size 0 */
454 TEX_SIZE0 = 0xb8,
455 /* Texture size 1 */
456 TEX_SIZE1 = 0xb9,
457 /* Texture size 2 */
458 TEX_SIZE2 = 0xba,
459 /* Texture size 3 */
460 TEX_SIZE3 = 0xbb,
461 /* Texture size 4 */
462 TEX_SIZE4 = 0xbc,
463 /* Texture size 5 */
464 TEX_SIZE5 = 0xbd,
465 /* Texture size 6 */
466 TEX_SIZE6 = 0xbe,
467 /* Texture size 7 */
468 TEX_SIZE7 = 0xbf,
469
470 /* Texture map mode */
472 /* Texture shade mapping */
474 /* Texture mode */
475 TEX_MODE = 0xc2,
476 /* Texture format */
477 TEX_FORMAT = 0xc3,
478 /* Load CLUT */
479 CLUT_LOAD = 0xc4,
480 /* CLUT format */
481 CLUT_FORMAT = 0xc5,
482 /* Texture filter */
483 TEX_FILTER = 0xc6,
484 /* Texture wrap */
485 TEX_WRAP = 0xc7,
486 /* Texture level */
487 TEX_LEVEL = 0xc8,
488 /* Texture function */
489 TEX_FUNC = 0xc9,
490 /* Texture environment color */
492 /* Texture flush */
493 TEX_FLUSH = 0xcb,
494 /* Texture sync */
495 TEX_SYNC = 0xcc,
496
497 /* Fog 1 */
498 FOG1 = 0xcd,
499 /* Fog 2 */
500 FOG2 = 0xce,
501 /* Fog color */
502 FOG_COLOR = 0xcf,
503 /* Texture LOD slope */
505
506 /* Frame buffer pixel format */
508 /* Clear mode */
509 CLEAR_MODE = 0xd3,
510 /* Scissor 1 */
511 SCISSOR1 = 0xd4,
512 /* Scissor 2 */
513 SCISSOR2 = 0xd5,
514
515 /* Minimum Z */
516 MIN_Z = 0xd6,
517 /* Maximum Z */
518 MAX_Z = 0xd7,
519 /* Color test */
520 COLOR_TEST = 0xd8,
521 /* Color reference */
522 COLOR_REF = 0xd9,
523 /* Color test mask */
525 /* Alpha test */
526 ALPHA_TEST = 0xdb,
527 /* Stencil test */
529 /* Stencil operation */
530 STENCIL_OP = 0xdd,
531 /* Z test */
532 Z_TEST = 0xde,
533 /* Blend mode */
534 BLEND_MODE = 0xdf,
535 /* Blend fixed A */
537 /* Blend fixed B */
539 /* Dither 0 */
540 DITH0 = 0xe2,
541 /* Dither 1 */
542 DITH1 = 0xe3,
543 /* Dither 2 */
544 DITH2 = 0xe4,
545 /* Dither 3 */
546 DITH3 = 0xe5,
547
548 /* Logical operation */
549 LOGIC_OP = 0xe6,
550 /* Z mask */
551 Z_MASK = 0xe7,
552 /* Mask color */
553 MASK_COLOR = 0xe8,
554 /* Mask alpha */
555 MASK_ALPHA = 0xe9,
556
557 /* Transfer start */
559 /* Transfer source offset */
561 /* Transfer destination offset */
563 /* Transfer format */
565 /* Transfer size */
567
568 /* Transfer flip */
570 /* Transfer out size */
572 /* Transfer out format */
574 /* Vertex weight */
576 /* Vertex weight address */
578 /* Vertex weight size */
580 /* Vertex weight type */
582 /* Vertex weight model */
584 /* Vertex weight normalize */
586 /* Vertex weight offset */
588 /* Vertex weight scale */
590 /* Vertex weight matrix */
592 /* Vertex weight matrix address */
594 /* Vertex weight matrix size */
596 /* Vertex weight matrix type */
598 /* Vertex weight matrix model */
600 /* Vertex weight matrix normalize */
603
604static inline void sendCommandi(GECommand cmd, int argument)
605{
606 *(gu_list->current++) = (cmd << 24) | (argument & 0xffffff);
607}
608
609static inline void sendCommandf(GECommand cmd, float argument)
610{
611 union
612 {
613 float f;
614 unsigned int i;
615 } t;
616 t.f = argument;
617
618 sendCommandi(cmd, t.i >> 8);
619}
620
621static inline int _sceGuUpdateStallAddr(void) {
622 if (gu_curr_context == GU_DIRECT) {
623 // Just if there are no objects in the stack (no guBeginObject)
625 int res;
627 if (res < 0) {
628 return res;
629 }
630 }
631 }
632 return 0;
633}
634
635#endif
int gu_init
Definition guInternal.c:17
int gu_display_on
Definition guInternal.c:19
void callbackFin(int id, void *arg)
Definition sceGuInit.c:291
void callbackSig(int id, void *arg)
Definition sceGuInit.c:298
int gu_curr_context
Definition guInternal.c:16
GuDrawBuffer gu_draw_buffer
Definition guInternal.c:22
GECommand
Definition guInternal.h:95
@ REGION2
Definition guInternal.h:135
@ TEX_BUF_WIDTH6
Definition guInternal.h:435
@ VIEW_MATRIX_NUMBER
Definition guInternal.h:206
@ BLEND_MODE
Definition guInternal.h:534
@ VERTEX_TYPE
Definition guInternal.h:127
@ STENCIL_TEST_ENABLE
Definition guInternal.h:164
@ VADDR
Definition guInternal.h:99
@ TEX_BUF_WIDTH4
Definition guInternal.h:431
@ TEX_LOD_SLOPE
Definition guInternal.h:504
@ LIGHT3_Y
Definition guInternal.h:297
@ VIEW_MATRIX_DATA
Definition guInternal.h:208
@ LIGHT0_X
Definition guInternal.h:277
@ LIGHT2_DIRECTION_Y
Definition guInternal.h:316
@ PATCH_DIVISION
Definition guInternal.h:196
@ VERTEX_WEIGHT_ADDR
Definition guInternal.h:577
@ MORPH_WEIGHT6
Definition guInternal.h:191
@ TEX_BUF_WIDTH3
Definition guInternal.h:429
@ ANTI_ALIAS_ENABLE
Definition guInternal.h:166
@ TEX_ADDR0
Definition guInternal.h:407
@ TEX_FORMAT
Definition guInternal.h:477
@ MORPH_WEIGHT2
Definition guInternal.h:183
@ JUMP
Definition guInternal.h:111
@ LIGHT1_X
Definition guInternal.h:283
@ Z_BUF_PTR
Definition guInternal.h:402
@ LIGHT3_LINEAR_ATTEN
Definition guInternal.h:347
@ AMBIENT_LIGHT_COLOR
Definition guInternal.h:262
@ LIGHT0_EXPONENT_ATTEN
Definition guInternal.h:352
@ WORLD_MATRIX_NUMBER
Definition guInternal.h:202
@ MATERIAL_COLOR
Definition guInternal.h:248
@ FOG1
Definition guInternal.h:498
@ LIGHT0_Y
Definition guInternal.h:279
@ AMBIENT_COLOR
Definition guInternal.h:252
@ VERTEX_WEIGHT_MATRIX_ADDR
Definition guInternal.h:593
@ TEX_SHADE_MAPPING
Definition guInternal.h:473
@ VERTEX_WEIGHT_MATRIX_NORMALIZE
Definition guInternal.h:601
@ LIGHT3_DIRECTION_Z
Definition guInternal.h:324
@ LIGHTING_ENABLE
Definition guInternal.h:138
@ PATCH_PRIMITIVE
Definition guInternal.h:198
@ LIGHT1_DIRECTION_Y
Definition guInternal.h:310
@ DEPTH_CLIP_ENABLE
Definition guInternal.h:148
@ TEX_MODE
Definition guInternal.h:475
@ VIEWPORT_Z_CENTER
Definition guInternal.h:229
@ LIGHT3_DIRECTION_X
Definition guInternal.h:320
@ LIGHT0_CONSTANT_ATTEN
Definition guInternal.h:327
@ TEX_SIZE4
Definition guInternal.h:462
@ TEX_OFFSET_V
Definition guInternal.h:237
@ LIGHT3_CUTOFF_ATTEN
Definition guInternal.h:367
@ COLOR_REF
Definition guInternal.h:522
@ TEXTURE_ENABLE
Definition guInternal.h:152
@ VERTEX_WEIGHT_SIZE
Definition guInternal.h:579
@ AMBIENT_ALPHA
Definition guInternal.h:258
@ Z_MASK
Definition guInternal.h:551
@ LIGHT_ENABLE2
Definition guInternal.h:144
@ LIGHT3_DIRECTION_Y
Definition guInternal.h:322
@ SIGNAL
Definition guInternal.h:121
@ TRANSFER_START
Definition guInternal.h:558
@ MASK_ALPHA
Definition guInternal.h:555
@ TEX_SIZE7
Definition guInternal.h:468
@ DITHER_ENABLE
Definition guInternal.h:156
@ SPLINE
Definition guInternal.h:107
@ TEX_MAP_MODE
Definition guInternal.h:471
@ TEX_ADDR6
Definition guInternal.h:419
@ LIGHT1_QUADRATIC_ATTEN
Definition guInternal.h:337
@ LIGHT1_DIRECTION_Z
Definition guInternal.h:312
@ TEX_SIZE1
Definition guInternal.h:456
@ TEX_FUNC
Definition guInternal.h:489
@ SHADE_MODE
Definition guInternal.h:244
@ BOUNDING_BOX
Definition guInternal.h:109
@ PROJ_MATRIX_DATA
Definition guInternal.h:212
@ TEX_SIZE0
Definition guInternal.h:454
@ TGEN_MATRIX_DATA
Definition guInternal.h:216
@ CLUT_BUF_PTR
Definition guInternal.h:440
@ LIGHT2_Y
Definition guInternal.h:291
@ CULL
Definition guInternal.h:395
@ STENCIL_OP
Definition guInternal.h:530
@ DITH3
Definition guInternal.h:546
@ TRANSFER_SIZE
Definition guInternal.h:566
@ TRANSFER_DST_OFFSET
Definition guInternal.h:562
@ LIGHT1_LINEAR_ATTEN
Definition guInternal.h:335
@ TRANSFER_SRC_W
Definition guInternal.h:447
@ LIGHT2_AMBIENT
Definition guInternal.h:382
@ CLUT_LOAD
Definition guInternal.h:479
@ LIGHT2_LINEAR_ATTEN
Definition guInternal.h:341
@ FOG2
Definition guInternal.h:500
@ VERTEX_WEIGHT_MATRIX_TYPE
Definition guInternal.h:597
@ ALPHA_TEST_ENABLE
Definition guInternal.h:160
@ TEX_WRAP
Definition guInternal.h:485
@ VERTEX_WEIGHT_MATRIX_MODEL
Definition guInternal.h:599
@ LIGHT_ENABLE0
Definition guInternal.h:140
@ LIGHT1_DIRECTION_X
Definition guInternal.h:308
@ LIGHT1_CUTOFF_ATTEN
Definition guInternal.h:363
@ TEX_FLUSH
Definition guInternal.h:493
@ LIGHT2_CUTOFF_ATTEN
Definition guInternal.h:365
@ PATCH_FACING
Definition guInternal.h:200
@ LIGHT1_Y
Definition guInternal.h:285
@ LIGHT0_LINEAR_ATTEN
Definition guInternal.h:329
@ ORIGIN
Definition guInternal.h:131
@ VERTEX_WEIGHT_OFFSET
Definition guInternal.h:587
@ TEX_FILTER
Definition guInternal.h:483
@ CULL_FACE_ENABLE
Definition guInternal.h:150
@ VIEWPORT_Z_SCALE
Definition guInternal.h:223
@ TEX_LEVEL
Definition guInternal.h:487
@ LIGHT0_QUADRATIC_ATTEN
Definition guInternal.h:331
@ MORPH_WEIGHT7
Definition guInternal.h:193
@ FRAME_BUF_PTR
Definition guInternal.h:398
@ BLEND_FIXED_A
Definition guInternal.h:536
@ TEX_OFFSET_U
Definition guInternal.h:235
@ TEX_BUF_WIDTH2
Definition guInternal.h:427
@ VIEWPORT_X_CENTER
Definition guInternal.h:225
@ LIGHT0_DIRECTION_Z
Definition guInternal.h:306
@ TRANSFER_FLIP
Definition guInternal.h:569
@ TEX_ADDR5
Definition guInternal.h:417
@ LIGHT3_EXPONENT_ATTEN
Definition guInternal.h:358
@ TEX_SCALE_V
Definition guInternal.h:233
@ ALPHA_TEST
Definition guInternal.h:526
@ VERTEX_WEIGHT_SCALE
Definition guInternal.h:589
@ FINISH
Definition guInternal.h:123
@ BLEND_FIXED_B
Definition guInternal.h:538
@ TGEN_MATRIX_NUMBER
Definition guInternal.h:214
@ LIGHT0_CUTOFF_ATTEN
Definition guInternal.h:361
@ MASK_COLOR
Definition guInternal.h:553
@ LOGIC_OP
Definition guInternal.h:549
@ DITH0
Definition guInternal.h:540
@ VIEWPORT_Y_SCALE
Definition guInternal.h:221
@ LIGHT_TYPE2
Definition guInternal.h:273
@ OFFSET_ADDR
Definition guInternal.h:129
@ FRAMEBUF_PIX_FORMAT
Definition guInternal.h:507
@ TRANSFER_DST_W
Definition guInternal.h:451
@ MATERIAL_SPECULAR
Definition guInternal.h:256
@ VIEWPORT_Y_CENTER
Definition guInternal.h:227
@ LIGHT3_DIFFUSE
Definition guInternal.h:390
@ TRANSFER_OUT_SIZE
Definition guInternal.h:571
@ REGION1
Definition guInternal.h:133
@ BEZIER
Definition guInternal.h:105
@ LIGHT_ENABLE3
Definition guInternal.h:146
@ MATERIAL_EMISSIVE
Definition guInternal.h:250
@ STENCIL_TEST
Definition guInternal.h:528
@ IADDR
Definition guInternal.h:101
@ LIGHT1_Z
Definition guInternal.h:287
@ MATERIAL_SPECULAR_COEF
Definition guInternal.h:260
@ BONE_MATRIX_NUMBER
Definition guInternal.h:175
@ SCISSOR2
Definition guInternal.h:513
@ BASE
Definition guInternal.h:125
@ LIGHT2_SPECULAR
Definition guInternal.h:386
@ TEX_SYNC
Definition guInternal.h:495
@ TRANSFER_SRC
Definition guInternal.h:445
@ LIGHT1_CONSTANT_ATTEN
Definition guInternal.h:333
@ MORPH_WEIGHT3
Definition guInternal.h:185
@ LIGHT2_Z
Definition guInternal.h:293
@ LIGHT3_X
Definition guInternal.h:295
@ LIGHT_TYPE1
Definition guInternal.h:271
@ VERTEX_WEIGHT_MODEL
Definition guInternal.h:583
@ TRANSFER_SRC_OFFSET
Definition guInternal.h:560
@ BONE_MATRIX_DATA
Definition guInternal.h:177
@ RET
Definition guInternal.h:117
@ COLOR_TESTMASK
Definition guInternal.h:524
@ FRAME_BUF_WIDTH
Definition guInternal.h:400
@ LIGHT0_DIRECTION_X
Definition guInternal.h:302
@ TEX_BUF_WIDTH0
Definition guInternal.h:423
@ TEX_SIZE3
Definition guInternal.h:460
@ VERTEX_WEIGHT
Definition guInternal.h:575
@ FOG_ENABLE
Definition guInternal.h:154
@ MORPH_WEIGHT1
Definition guInternal.h:181
@ FOG_COLOR
Definition guInternal.h:502
@ CALL
Definition guInternal.h:115
@ VERTEX_WEIGHT_TYPE
Definition guInternal.h:581
@ TEX_ADDR7
Definition guInternal.h:421
@ CLEAR_MODE
Definition guInternal.h:509
@ LIGHT3_CONSTANT_ATTEN
Definition guInternal.h:345
@ TEX_BUF_WIDTH1
Definition guInternal.h:425
@ TRANSFER_FORMAT
Definition guInternal.h:564
@ LIGHT3_SPECULAR
Definition guInternal.h:392
@ BJUMP
Definition guInternal.h:113
@ LOGIC_OP_ENABLE
Definition guInternal.h:172
@ LIGHT0_SPECULAR
Definition guInternal.h:374
@ LIGHT2_X
Definition guInternal.h:289
@ ALPHA_BLEND_ENABLE
Definition guInternal.h:158
@ Z_TEST
Definition guInternal.h:532
@ TEX_SCALE_U
Definition guInternal.h:231
@ LIGHT0_DIFFUSE
Definition guInternal.h:372
@ TEX_SIZE5
Definition guInternal.h:464
@ LIGHT2_DIRECTION_X
Definition guInternal.h:314
@ MORPH_WEIGHT0
Definition guInternal.h:179
@ TEX_ADDR4
Definition guInternal.h:415
@ DITH1
Definition guInternal.h:542
@ VERTEX_WEIGHT_MATRIX
Definition guInternal.h:591
@ LIGHT3_AMBIENT
Definition guInternal.h:388
@ LIGHT3_Z
Definition guInternal.h:299
@ LIGHT3_QUADRATIC_ATTEN
Definition guInternal.h:349
@ PATCH_CULL_ENABLE
Definition guInternal.h:168
@ COLOR_TEST
Definition guInternal.h:520
@ MATERIAL_DIFFUSE
Definition guInternal.h:254
@ TEX_ADDR1
Definition guInternal.h:409
@ OFFSET_Y
Definition guInternal.h:241
@ TEX_BUF_WIDTH7
Definition guInternal.h:437
@ TRANSFER_DST
Definition guInternal.h:449
@ SCISSOR1
Definition guInternal.h:511
@ LIGHT_MODE
Definition guInternal.h:266
@ VIEWPORT_X_SCALE
Definition guInternal.h:219
@ LIGHT0_AMBIENT
Definition guInternal.h:370
@ MIN_Z
Definition guInternal.h:516
@ LIGHT2_DIRECTION_Z
Definition guInternal.h:318
@ Z_TEST_ENABLE
Definition guInternal.h:162
@ END
Definition guInternal.h:119
@ TEX_ADDR2
Definition guInternal.h:411
@ LIGHT2_DIFFUSE
Definition guInternal.h:384
@ LIGHT2_EXPONENT_ATTEN
Definition guInternal.h:356
@ LIGHT0_Z
Definition guInternal.h:281
@ TRANSFER_OUT_FORMAT
Definition guInternal.h:573
@ WORLD_MATRIX_DATA
Definition guInternal.h:204
@ PRIM
Definition guInternal.h:103
@ VERTEX_WEIGHT_NORMALIZE
Definition guInternal.h:585
@ TEX_SIZE6
Definition guInternal.h:466
@ LIGHT1_EXPONENT_ATTEN
Definition guInternal.h:354
@ Z_BUF_WIDTH
Definition guInternal.h:404
@ LIGHT1_DIFFUSE
Definition guInternal.h:378
@ LIGHT1_AMBIENT
Definition guInternal.h:376
@ VERTEX_WEIGHT_MATRIX_SIZE
Definition guInternal.h:595
@ MAX_Z
Definition guInternal.h:518
@ CLUT_FORMAT
Definition guInternal.h:481
@ LIGHT2_CONSTANT_ATTEN
Definition guInternal.h:339
@ MORPH_WEIGHT4
Definition guInternal.h:187
@ TEX_BUF_WIDTH5
Definition guInternal.h:433
@ TEX_ADDR3
Definition guInternal.h:413
@ TEX_ENV_COLOR
Definition guInternal.h:491
@ PROJ_MATRIX_NUMBER
Definition guInternal.h:210
@ LIGHT1_SPECULAR
Definition guInternal.h:380
@ NORMAL_REVERSE
Definition guInternal.h:246
@ LIGHT2_QUADRATIC_ATTEN
Definition guInternal.h:343
@ NOP
Definition guInternal.h:97
@ LIGHT_TYPE3
Definition guInternal.h:275
@ AMBIENT_LIGHT_ALPHA
Definition guInternal.h:264
@ COLOR_TEST_ENABLE
Definition guInternal.h:170
@ MORPH_WEIGHT5
Definition guInternal.h:189
@ OFFSET_X
Definition guInternal.h:239
@ DITH2
Definition guInternal.h:544
@ LIGHT0_DIRECTION_Y
Definition guInternal.h:304
@ LIGHT_ENABLE1
Definition guInternal.h:142
@ LIGHT_TYPE0
Definition guInternal.h:269
@ TEX_SIZE2
Definition guInternal.h:458
@ CLUT_BUF_WIDTH
Definition guInternal.h:442
int gu_states
Definition guInternal.c:21
GuDisplayList * gu_list
Definition guInternal.c:15
unsigned int * gu_object_stack[]
Definition guInternal.c:23
GuSettings gu_settings
Definition guInternal.c:14
GuContext gu_contexts[3]
Definition guInternal.c:11
int gu_object_stack_depth
Definition guInternal.c:24
int gu_call_mode
Definition guInternal.c:20
void(* GuCallback)(int)
Definition guInternal.h:21
int ge_list_executed[2]
Definition guInternal.c:12
void * ge_edram_address
Definition guInternal.c:13
int gu_first_start
Definition guInternal.c:18
int sceGeListUpdateStallAddr(int qid, void *stall)
Update the stall address for the specified queue.
#define GU_DIRECT
Definition pspgu.h:294
void(* GuSwapBuffersCallback)(void **display, void **render)
Definition pspgu.h:349
Definition guInternal.h:44
int fragment_2x
Definition guInternal.h:52
GuDisplayList list
Definition guInternal.h:45
unsigned int clear_color
Definition guInternal.h:57
int near_plane
Definition guInternal.h:49
unsigned int clear_depth
Definition guInternal.h:59
int texture_proj_map_mode
Definition guInternal.h:54
int texture_mode
Definition guInternal.h:60
int scissor_enable
Definition guInternal.h:46
int texture_map_mode
Definition guInternal.h:55
unsigned int clear_stencil
Definition guInternal.h:58
int texture_function
Definition guInternal.h:53
int far_plane
Definition guInternal.h:50
int depth_offset
Definition guInternal.h:51
Definition guInternal.h:37
unsigned int * start
Definition guInternal.h:38
unsigned int * current
Definition guInternal.h:39
int parent_context
Definition guInternal.h:40
Definition guInternal.h:64
int width
Definition guInternal.h:71
int depth_width
Definition guInternal.h:70
int height
Definition guInternal.h:72
void * frame_buffer
Definition guInternal.h:67
void * depth_buffer
Definition guInternal.h:69
int pixel_size
Definition guInternal.h:65
void * disp_buffer
Definition guInternal.h:68
int frame_width
Definition guInternal.h:66
Definition guInternal.h:24
int kernel_event_flag
Definition guInternal.h:29
int ge_callback_id
Definition guInternal.h:30
int swapBuffersBehaviour
Definition guInternal.h:33
GuCallback sig
Definition guInternal.h:25
int signal_offset
Definition guInternal.h:28
GuSwapBuffersCallback swapBuffersCallback
Definition guInternal.h:32
GuCallback fin
Definition guInternal.h:26