summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/cell/common.h3
-rw-r--r--src/mesa/pipe/cell/spu/main.c6
-rw-r--r--src/mesa/pipe/cell/spu/main.h1
-rw-r--r--src/mesa/pipe/cell/spu/tri.c3
4 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/pipe/cell/common.h b/src/mesa/pipe/cell/common.h
index ee20bd150b..983ccd0775 100644
--- a/src/mesa/pipe/cell/common.h
+++ b/src/mesa/pipe/cell/common.h
@@ -35,6 +35,7 @@
#include "pipe/p_compiler.h"
#include "pipe/p_util.h"
+#include "pipe/p_format.h"
/** for sanity checking */
@@ -60,7 +61,7 @@ struct cell_command_framebuffer
{
void *start;
int width, height;
- unsigned format;
+ enum pipe_format format;
} ALIGN16_ATTRIB;
diff --git a/src/mesa/pipe/cell/spu/main.c b/src/mesa/pipe/cell/spu/main.c
index 94f13029ff..02b23866a5 100644
--- a/src/mesa/pipe/cell/spu/main.c
+++ b/src/mesa/pipe/cell/spu/main.c
@@ -285,10 +285,12 @@ main_loop(void)
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;
diff --git a/src/mesa/pipe/cell/spu/main.h b/src/mesa/pipe/cell/spu/main.h
index 47ce4be4b4..3240e01615 100644
--- a/src/mesa/pipe/cell/spu/main.h
+++ b/src/mesa/pipe/cell/spu/main.h
@@ -38,6 +38,7 @@ extern volatile struct cell_init_info init;
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 */
};
diff --git a/src/mesa/pipe/cell/spu/tri.c b/src/mesa/pipe/cell/spu/tri.c
index 4e198e638c..3707ebea45 100644
--- a/src/mesa/pipe/cell/spu/tri.c
+++ b/src/mesa/pipe/cell/spu/tri.c
@@ -234,8 +234,7 @@ pack_color(const float color[4])
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: