spu_main.h File Reference

Include dependency graph for spu_main.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  tile_t
 A tile is basically a TILE_SIZE x TILE_SIZE block of 4-byte pixels. More...
struct  spu_framebuffer
struct  spu_texture
struct  spu_global
 All SPU global/context state will be in a singleton object of this type:. More...

Defines

#define MAX_WIDTH   1024
#define MAX_HEIGHT   1024
#define TILE_STATUS_CLEAR   1
#define TILE_STATUS_DEFINED   2
 defined in FB, but not in local store
#define TILE_STATUS_CLEAN   3
 in local store, but not changed
#define TILE_STATUS_DIRTY   4
 modified locally, but not put back yet
#define TILE_STATUS_GETTING   5
 mfc_get() called but not yet arrived
#define MAX_CONSTANTS   32
 Fragment program constants (XXX preliminary/used).
#define TAG_SURFACE_CLEAR   10
#define TAG_VERTEX_BUFFER   11
#define TAG_READ_TILE_COLOR   12
#define TAG_READ_TILE_Z   13
#define TAG_WRITE_TILE_COLOR   14
#define TAG_WRITE_TILE_Z   15
#define TAG_INDEX_BUFFER   16
#define TAG_BATCH_BUFFER   17
#define TAG_MISC   18
#define TAG_DCACHE0   20
#define TAG_DCACHE1   21
#define TAG_DCACHE2   22
#define TAG_DCACHE3   23

Typedefs

typedef vector float(* spu_sample_texture_func )(uint unit, vector float texcoord)
 Function for sampling textures.
typedef void(* spu_fragment_ops_func )(uint x, uint y, tile_t *colorTile, tile_t *depthStencilTile, vector float fragZ, vector float fragRed, vector float fragGreen, vector float fragBlue, vector float fragAlpha, vector unsigned int mask)
 Function for performing per-fragment ops.
typedef void(* spu_fragment_program_func )(vector float *inputs, vector float *outputs, vector float *constants)
 Function for running fragment program.

Functions

static void wait_on_mask (unsigned tagMask)
static void wait_on_mask_all (unsigned tagMask)
static void memset16 (ushort *d, ushort value, uint count)
static void memset32 (uint *d, uint value, uint count)

Variables

struct spu_framebuffer ALIGN16_ATTRIB
struct spu_global spu
boolean Debug


Define Documentation

#define MAX_CONSTANTS   32

Fragment program constants (XXX preliminary/used).

Definition at line 160 of file spu_main.h.

#define MAX_HEIGHT   1024

Definition at line 41 of file spu_main.h.

#define MAX_WIDTH   1024

Definition at line 40 of file spu_main.h.

#define TAG_BATCH_BUFFER   17

Definition at line 181 of file spu_main.h.

#define TAG_DCACHE0   20

Definition at line 183 of file spu_main.h.

#define TAG_DCACHE1   21

Definition at line 184 of file spu_main.h.

#define TAG_DCACHE2   22

Definition at line 185 of file spu_main.h.

#define TAG_DCACHE3   23

Definition at line 186 of file spu_main.h.

#define TAG_INDEX_BUFFER   16

Definition at line 180 of file spu_main.h.

#define TAG_MISC   18

Definition at line 182 of file spu_main.h.

#define TAG_READ_TILE_COLOR   12

Definition at line 176 of file spu_main.h.

#define TAG_READ_TILE_Z   13

Definition at line 177 of file spu_main.h.

#define TAG_SURFACE_CLEAR   10

Definition at line 174 of file spu_main.h.

#define TAG_VERTEX_BUFFER   11

Definition at line 175 of file spu_main.h.

#define TAG_WRITE_TILE_COLOR   14

Definition at line 178 of file spu_main.h.

#define TAG_WRITE_TILE_Z   15

Definition at line 179 of file spu_main.h.

#define TILE_STATUS_CLEAN   3

in local store, but not changed

Definition at line 58 of file spu_main.h.

#define TILE_STATUS_CLEAR   1

Definition at line 56 of file spu_main.h.

#define TILE_STATUS_DEFINED   2

defined in FB, but not in local store

Definition at line 57 of file spu_main.h.

#define TILE_STATUS_DIRTY   4

modified locally, but not put back yet

Definition at line 59 of file spu_main.h.

#define TILE_STATUS_GETTING   5

mfc_get() called but not yet arrived

Definition at line 60 of file spu_main.h.


Typedef Documentation

typedef void(* spu_fragment_ops_func)(uint x, uint y, tile_t *colorTile, tile_t *depthStencilTile, vector float fragZ, vector float fragRed, vector float fragGreen, vector float fragBlue, vector float fragAlpha, vector unsigned int mask)

Function for performing per-fragment ops.

Definition at line 68 of file spu_main.h.

typedef void(* spu_fragment_program_func)(vector float *inputs, vector float *outputs, vector float *constants)

Function for running fragment program.

Definition at line 79 of file spu_main.h.

typedef vector float(* spu_sample_texture_func)(uint unit, vector float texcoord)

Function for sampling textures.

Definition at line 64 of file spu_main.h.


Function Documentation

static void memset16 ( ushort d,
ushort  value,
uint  count 
) [static]

Definition at line 212 of file spu_main.h.

00213 {
00214    uint i;
00215    for (i = 0; i < count; i++)
00216       d[i] = value;
00217 }

static void memset32 ( uint d,
uint  value,
uint  count 
) [static]

Definition at line 221 of file spu_main.h.

00222 {
00223    uint i;
00224    for (i = 0; i < count; i++)
00225       d[i] = value;
00226 }

static void wait_on_mask ( unsigned  tagMask  )  [static]

Definition at line 191 of file spu_main.h.

00192 {
00193    mfc_write_tag_mask( tagMask );
00194    /* wait for completion of _any_ DMAs specified by tagMask */
00195    mfc_read_tag_status_any();
00196 }

static void wait_on_mask_all ( unsigned  tagMask  )  [static]

Definition at line 200 of file spu_main.h.

00201 {
00202    mfc_write_tag_mask( tagMask );
00203    /* wait for completion of _any_ DMAs specified by tagMask */
00204    mfc_read_tag_status_all();
00205 }


Variable Documentation

struct spu_global ALIGN16_ATTRIB

boolean Debug

Definition at line 53 of file spu_main.c.

struct spu_global spu

Definition at line 55 of file spu_main.c.


Generated on Tue Sep 29 06:25:32 2009 for Gallium3D by  doxygen 1.5.4