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...

Defines

#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 CELL_MAX_SAMPLERS   4
#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_CLEAR_SURFACE   2
#define CELL_CMD_FINISH   3
#define CELL_CMD_RENDER   4
#define CELL_CMD_BATCH   5
#define CELL_CMD_RELEASE_VERTS   6
#define CELL_CMD_STATE_FRAMEBUFFER   10
#define CELL_CMD_STATE_FRAGMENT_OPS   11
#define CELL_CMD_STATE_SAMPLER   12
#define CELL_CMD_STATE_TEXTURE   13
#define CELL_CMD_STATE_VERTEX_INFO   14
#define CELL_CMD_STATE_VIEWPORT   15
#define CELL_CMD_STATE_UNIFORMS   16
#define CELL_CMD_STATE_VS_ARRAY_INFO   17
#define CELL_CMD_STATE_BIND_VS   18
#define CELL_CMD_STATE_FRAGMENT_PROGRAM   19
#define CELL_CMD_STATE_ATTRIB_FETCH   20
#define CELL_CMD_VS_EXECUTE   22
#define CELL_CMD_FLUSH_BUFFER_RANGE   23
#define CELL_NUM_BUFFERS   4
#define CELL_BUFFER_SIZE   (4*1024)
 16KB would be the max
#define CELL_BUFFER_STATUS_FREE   10
#define CELL_BUFFER_STATUS_USED   20
#define CELL_DEBUG_CHECKER   (1 << 0)
#define CELL_DEBUG_SYNC   (1 << 1)
#define SPU_MAX_FRAGMENT_OPS_INSTS   64
 Max instructions for doing per-fragment operations.
#define SPU_MAX_FRAGMENT_PROGRAM_INSTS   128
 Max instructions for fragment programs.
#define SPU_VERTS_PER_BATCH   64

Variables

struct cell_command ALIGN16_ATTRIB


Define Documentation

#define ASSERT (  ) 

Value:

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.

#define CELL_BUFFER_STATUS_FREE   10

Definition at line 104 of file common.h.

#define CELL_BUFFER_STATUS_USED   20

Definition at line 105 of file common.h.

#define CELL_CMD_BATCH   5

Definition at line 84 of file common.h.

#define CELL_CMD_CLEAR_SURFACE   2

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.

#define CELL_CMD_FLUSH_BUFFER_RANGE   23

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.

#define CELL_CMD_RELEASE_VERTS   6

Definition at line 85 of file common.h.

#define CELL_CMD_RENDER   4

Definition at line 83 of file common.h.

#define CELL_CMD_STATE_ATTRIB_FETCH   20

Definition at line 96 of file common.h.

#define CELL_CMD_STATE_BIND_VS   18

Definition at line 94 of file common.h.

#define CELL_CMD_STATE_FRAGMENT_OPS   11

Definition at line 87 of file common.h.

#define CELL_CMD_STATE_FRAGMENT_PROGRAM   19

Definition at line 95 of file common.h.

#define CELL_CMD_STATE_FRAMEBUFFER   10

Definition at line 86 of file common.h.

#define CELL_CMD_STATE_SAMPLER   12

Definition at line 88 of file common.h.

#define CELL_CMD_STATE_TEXTURE   13

Definition at line 89 of file common.h.

#define CELL_CMD_STATE_UNIFORMS   16

Definition at line 92 of file common.h.

#define CELL_CMD_STATE_VERTEX_INFO   14

Definition at line 90 of file common.h.

#define CELL_CMD_STATE_VIEWPORT   15

Definition at line 91 of file common.h.

#define CELL_CMD_STATE_VS_ARRAY_INFO   17

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.

#define CELL_MAX_SAMPLERS   4

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.

#define SPU_MAX_FRAGMENT_OPS_INSTS   64

Max instructions for doing per-fragment operations.

Definition at line 114 of file common.h.

#define SPU_MAX_FRAGMENT_PROGRAM_INSTS   128

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