#include "pipe/p_compiler.h"
#include "pipe/p_util.h"
+#include "pipe/p_format.h"
/** for sanity checking */
{
void *start;
int width, height;
- unsigned format;
+ enum pipe_format format;
} ALIGN16_ATTRIB;
exitFlag = 1;
break;
case CELL_CMD_FRAMEBUFFER:
- printf("SPU %u: FRAMEBUFFER: %d x %d at %p\n", init.id,
+ printf("SPU %u: FRAMEBUFFER: %d x %d at %p, format 0x%x\n", init.id,
cmd.fb.width,
cmd.fb.height,
- cmd.fb.start);
+ cmd.fb.start,
+ cmd.fb.format);
+ fb.format = cmd.fb.format;
fb.width = cmd.fb.width;
fb.height = cmd.fb.height;
fb.width_tiles = (fb.width + TILE_SIZE - 1) / TILE_SIZE;
struct framebuffer {
void *start; /**< addr of surface in main memory */
+ enum pipe_format format;
uint width, height; /**< size in pixels */
uint width_tiles, height_tiles; /**< width and height in tiles */
};
uint g = (uint) (color[1] * 255.0);
uint b = (uint) (color[2] * 255.0);
uint a = (uint) (color[3] * 255.0);
- const enum pipe_format format = PIPE_FORMAT_A8R8G8B8_UNORM; /* XXX temp */
- switch (format) {
+ switch (fb.format) {
case PIPE_FORMAT_A8R8G8B8_UNORM:
return (a << 24) | (r << 16) | (g << 8) | b;
case PIPE_FORMAT_B8G8R8A8_UNORM: