Go to the source code of this file.
Functions | |
void | get_tile (uint tx, uint ty, tile_t *tile, int tag, int zBuf) |
Get tile of color or Z values from main memory, put into SPU memory. | |
void | put_tile (uint tx, uint ty, const tile_t *tile, int tag, int zBuf) |
Move tile of color or Z values from SPU memory to main memory. | |
static void | clear_c_tile (tile_t *ctile) |
static void | clear_z_tile (tile_t *ztile) |
static void clear_c_tile | ( | tile_t * | ctile | ) | [static] |
Definition at line 48 of file spu_tile.h.
References spu_framebuffer::color_clear_value, spu_global::fb, memset32(), spu, TILE_SIZE, and tile_t::ui.
00049 { 00050 memset32((uint*) ctile->ui, 00051 spu.fb.color_clear_value, 00052 TILE_SIZE * TILE_SIZE); 00053 }
static void clear_z_tile | ( | tile_t * | ztile | ) | [static] |
Definition at line 57 of file spu_tile.h.
References ASSERT, spu_framebuffer::depth_clear_value, spu_global::fb, memset16(), memset32(), spu, TILE_SIZE, tile_t::ui, tile_t::us, and spu_framebuffer::zsize.
00058 { 00059 if (spu.fb.zsize == 2) { 00060 memset16((ushort*) ztile->us, 00061 spu.fb.depth_clear_value, 00062 TILE_SIZE * TILE_SIZE); 00063 } 00064 else { 00065 ASSERT(spu.fb.zsize != 0); 00066 memset32((uint*) ztile->ui, 00067 spu.fb.depth_clear_value, 00068 TILE_SIZE * TILE_SIZE); 00069 } 00070 }
Get tile of color or Z values from main memory, put into SPU memory.
Definition at line 38 of file spu_tile.c.
References ASSERT, ASSERT_ALIGN16, spu_framebuffer::color_start, spu_framebuffer::depth_start, spu_global::fb, spu_framebuffer::height_tiles, offset(), spu, TILE_SIZE, tile_t::ui, spu_framebuffer::width_tiles, and spu_framebuffer::zsize.
00039 { 00040 const uint offset = ty * spu.fb.width_tiles + tx; 00041 const uint bytesPerTile = TILE_SIZE * TILE_SIZE * (zBuf ? spu.fb.zsize : 4); 00042 const ubyte *src = zBuf ? spu.fb.depth_start : spu.fb.color_start; 00043 00044 src += offset * bytesPerTile; 00045 00046 ASSERT(tx < spu.fb.width_tiles); 00047 ASSERT(ty < spu.fb.height_tiles); 00048 ASSERT_ALIGN16(tile); 00049 /* 00050 printf("get_tile: dest: %p src: 0x%x size: %d\n", 00051 tile, (unsigned int) src, bytesPerTile); 00052 */ 00053 mfc_get(tile->ui, /* dest in local memory */ 00054 (unsigned int) src, /* src in main memory */ 00055 bytesPerTile, 00056 tag, 00057 0, /* tid */ 00058 0 /* rid */); 00059 }
Move tile of color or Z values from SPU memory to main memory.
Definition at line 66 of file spu_tile.c.
References ASSERT, ASSERT_ALIGN16, spu_framebuffer::color_start, spu_framebuffer::depth_start, spu_global::fb, spu_framebuffer::height_tiles, offset(), spu, TILE_SIZE, tile_t::ui, spu_framebuffer::width_tiles, and spu_framebuffer::zsize.
00067 { 00068 const uint offset = ty * spu.fb.width_tiles + tx; 00069 const uint bytesPerTile = TILE_SIZE * TILE_SIZE * (zBuf ? spu.fb.zsize : 4); 00070 ubyte *dst = zBuf ? spu.fb.depth_start : spu.fb.color_start; 00071 00072 dst += offset * bytesPerTile; 00073 00074 ASSERT(tx < spu.fb.width_tiles); 00075 ASSERT(ty < spu.fb.height_tiles); 00076 ASSERT_ALIGN16(tile); 00077 /* 00078 printf("SPU %u: put_tile: src: %p dst: 0x%x size: %d\n", 00079 spu.init.id, 00080 tile, (unsigned int) dst, bytesPerTile); 00081 */ 00082 mfc_put((void *) tile->ui, /* src in local memory */ 00083 (unsigned int) dst, /* dst in main memory */ 00084 bytesPerTile, 00085 tag, 00086 0, /* tid */ 00087 0 /* rid */); 00088 }