diff options
author | Brian <[email protected]> | 2008-01-03 07:49:59 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-01-03 07:49:59 -0700 |
commit | 5cd96f7684adc7ba52a216fb676c7eb88ba3f66a (patch) | |
tree | 48a36245e27aef167d49fc47ae8474a257f17c62 /src/mesa/pipe | |
parent | 7aee3eff18decd6ce46f63a44c9a531414565265 (diff) |
pass surface format in cell_command_framebuffer struct
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/cell/common.h | 3 | ||||
-rw-r--r-- | src/mesa/pipe/cell/spu/main.c | 6 | ||||
-rw-r--r-- | src/mesa/pipe/cell/spu/main.h | 1 | ||||
-rw-r--r-- | src/mesa/pipe/cell/spu/tri.c | 3 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/pipe/cell/common.h b/src/mesa/pipe/cell/common.h index ee20bd150b7..983ccd07750 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 94f13029ffa..02b23866a5b 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 47ce4be4b44..3240e01615b 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 4e198e638cb..3707ebea458 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: |