summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-27 13:58:06 -0700
committerBrian <[email protected]>2008-02-27 13:58:06 -0700
commit364f8cad0f8f02fd39d9c51ea0774d349121b58d (patch)
tree1e1d2e81a3093b1b59a7b9ecc9567d547015a019 /src/gallium/drivers/cell
parent8383f798b41df9a305e0a33afe8afa028d5d5dfb (diff)
gallium: move is_format_supported() to pipe_screen struct
Diffstat (limited to 'src/gallium/drivers/cell')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.c23
-rw-r--r--src/gallium/drivers/cell/ppu/cell_screen.c19
2 files changed, 19 insertions, 23 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index 351601473d2..2301df5ba52 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -57,26 +57,6 @@
-static boolean
-cell_is_format_supported( struct pipe_context *pipe,
- enum pipe_format format, uint type )
-{
- /*struct cell_context *cell = cell_context( pipe );*/
-
- switch (type) {
- case PIPE_TEXTURE:
- /* cell supports all texture formats, XXX for now anyway */
- return TRUE;
- case PIPE_SURFACE:
- /* cell supports all (off-screen) surface formats, XXX for now */
- return TRUE;
- default:
- assert(0);
- return FALSE;
- }
-}
-
-
static void
cell_destroy_context( struct pipe_context *pipe )
{
@@ -122,9 +102,6 @@ cell_create_context(struct pipe_screen *screen,
cell->pipe.screen = screen;
cell->pipe.destroy = cell_destroy_context;
- /* queries */
- cell->pipe.is_format_supported = cell_is_format_supported;
-
/* state setters */
cell->pipe.set_vertex_buffer = cell_set_vertex_buffer;
cell->pipe.set_vertex_element = cell_set_vertex_element;
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index 75255c0466a..124670df255 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -112,6 +112,24 @@ cell_get_paramf(struct pipe_screen *screen, int param)
}
+static boolean
+cell_is_format_supported( struct pipe_screen *screen,
+ enum pipe_format format, uint type )
+{
+ switch (type) {
+ case PIPE_TEXTURE:
+ /* cell supports all texture formats, XXX for now anyway */
+ return TRUE;
+ case PIPE_SURFACE:
+ /* cell supports all (off-screen) surface formats, XXX for now */
+ return TRUE;
+ default:
+ assert(0);
+ return FALSE;
+ }
+}
+
+
static void
cell_destroy_screen( struct pipe_screen *screen )
{
@@ -140,6 +158,7 @@ cell_create_screen(struct pipe_winsys *winsys)
screen->get_vendor = cell_get_vendor;
screen->get_param = cell_get_param;
screen->get_paramf = cell_get_paramf;
+ screen->is_format_supported = cell_is_format_supported;
cell_init_screen_texture_funcs(screen);