common.h File Reference

Include dependency graph for common.h:

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

Go to the source code of this file.

Data Structures

struct  cell_command_fragment_ops
 Command to specify per-fragment operations state and generated code. More...
struct  cell_command_fragment_program
 Command to send a fragment progra to SPUs. More...
struct  cell_command_framebuffer
 Tell SPUs about the framebuffer size, location. More...
struct  cell_command_clear_surface
 Clear framebuffer to the given value/color. More...
struct  cell_array_info
 Array info used by the vertex shader's vertex puller. More...
struct  cell_attribute_fetch_code
struct  cell_buffer_range
struct  cell_shader_info
struct  cell_command_vs
struct  cell_command_render
struct  cell_command_release_verts
struct  cell_command_sampler
struct  cell_command_texture
struct  cell_command
 XXX unions don't seem to work. More...
struct  cell_init_info
 This is the object passed to spe_create_thread(). More...


#define ASSERT(x)
 Types and tokens which are common to the SPU and PPU code.
#define ASSERT_ALIGN16(ptr)   ASSERT((((unsigned long) (ptr)) & 0xf) == 0);
 for sanity checking
#define ROUNDUP4(k)   (((k) + 0x3) & ~0x3)
 round up value to next multiple of 4
#define ROUNDUP8(k)   (((k) + 0x7) & ~0x7)
 round up value to next multiple of 8
#define ROUNDUP16(k)   (((k) + 0xf) & ~0xf)
 round up value to next multiple of 16
#define CELL_MAX_SPUS   6
#define TILE_SIZE   32
#define CELL_CMD_OPCODE_MASK   0xff
 The low byte of a mailbox word contains the command opcode.
#define CELL_CMD_EXIT   1
#define CELL_CMD_FINISH   3
#define CELL_CMD_RENDER   4
#define CELL_CMD_BATCH   5
#define CELL_CMD_VS_EXECUTE   22
#define CELL_NUM_BUFFERS   4
#define CELL_BUFFER_SIZE   (4*1024)
 16KB would be the max
#define CELL_DEBUG_CHECKER   (1 << 0)
#define CELL_DEBUG_SYNC   (1 << 1)
 Max instructions for doing per-fragment operations.
 Max instructions for fragment programs.
#define SPU_VERTS_PER_BATCH   64


struct cell_command ALIGN16_ATTRIB

Define Documentation

#define ASSERT (  ) 


if (!(x)) { \
      ubyte *p = NULL; \
      fprintf(stderr, "%s:%d: %s(): assertion %s failed.\n", \
              __FILE__, __LINE__, __FUNCTION__, #x);             \
      *p = 0; \
      exit(1); \
Types and tokens which are common to the SPU and PPU code.

The standard assert macro doesn't seem to work reliably

Definition at line 42 of file common.h.

#define ASSERT_ALIGN16 ( ptr   )     ASSERT((((unsigned long) (ptr)) & 0xf) == 0);

for sanity checking

Definition at line 53 of file common.h.

#define CELL_BUFFER_SIZE   (4*1024)

16KB would be the max

Definition at line 102 of file common.h.


Definition at line 104 of file common.h.


Definition at line 105 of file common.h.

#define CELL_CMD_BATCH   5

Definition at line 84 of file common.h.


Definition at line 81 of file common.h.

#define CELL_CMD_EXIT   1

Definition at line 80 of file common.h.

#define CELL_CMD_FINISH   3

Definition at line 82 of file common.h.


Definition at line 98 of file common.h.

#define CELL_CMD_OPCODE_MASK   0xff

The low byte of a mailbox word contains the command opcode.

Remaining higher bytes are command specific.

Definition at line 78 of file common.h.


Definition at line 85 of file common.h.

#define CELL_CMD_RENDER   4

Definition at line 83 of file common.h.


Definition at line 96 of file common.h.


Definition at line 94 of file common.h.


Definition at line 87 of file common.h.


Definition at line 95 of file common.h.


Definition at line 86 of file common.h.


Definition at line 88 of file common.h.


Definition at line 89 of file common.h.


Definition at line 92 of file common.h.


Definition at line 90 of file common.h.


Definition at line 91 of file common.h.


Definition at line 93 of file common.h.

#define CELL_CMD_VS_EXECUTE   22

Definition at line 97 of file common.h.

#define CELL_DEBUG_CHECKER   (1 << 0)

Definition at line 108 of file common.h.

#define CELL_DEBUG_SYNC   (1 << 1)

Definition at line 109 of file common.h.


Definition at line 69 of file common.h.

#define CELL_MAX_SPUS   6

Definition at line 67 of file common.h.

#define CELL_NUM_BUFFERS   4

Definition at line 101 of file common.h.

#define ROUNDUP16 (  )     (((k) + 0xf) & ~0xf)

round up value to next multiple of 16

Definition at line 64 of file common.h.

#define ROUNDUP4 (  )     (((k) + 0x3) & ~0x3)

round up value to next multiple of 4

Definition at line 58 of file common.h.

#define ROUNDUP8 (  )     (((k) + 0x7) & ~0x7)

round up value to next multiple of 8

Definition at line 61 of file common.h.


Max instructions for doing per-fragment operations.

Definition at line 114 of file common.h.


Max instructions for fragment programs.

Definition at line 130 of file common.h.

#define SPU_VERTS_PER_BATCH   64

Definition at line 206 of file common.h.

#define TILE_SIZE   32

Definition at line 71 of file common.h.

Variable Documentation

struct cell_init_info ALIGN16_ATTRIB

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