X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fcell%2Fppu%2Fcell_context.c;h=afcea616d5934c8743c578742184865566d11aa5;hb=a56da1005d30da60701e33b75d5f4f37096df060;hp=ae82ded334a56e3f415c1c8720dd41af340d23c6;hpb=53116910b10e3b8a05f42970eff311c21808699f;p=mesa.git diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c index ae82ded334a..afcea616d59 100644 --- a/src/gallium/drivers/cell/ppu/cell_context.c +++ b/src/gallium/drivers/cell/ppu/cell_context.c @@ -36,7 +36,6 @@ #include "pipe/p_defines.h" #include "pipe/p_format.h" #include "util/u_memory.h" -#include "pipe/internal/p_winsys_screen.h" #include "pipe/p_screen.h" #include "draw/draw_context.h" @@ -99,10 +98,32 @@ static const struct debug_named_value cell_debug_flags[] = { {NULL, 0} }; +static unsigned int +cell_is_texture_referenced( struct pipe_context *pipe, + struct pipe_texture *texture, + unsigned face, unsigned level) +{ + /** + * FIXME: Optimize. + */ + + return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; +} + +static unsigned int +cell_is_buffer_referenced( struct pipe_context *pipe, + struct pipe_buffer *buf) +{ + /** + * FIXME: Optimize. + */ + + return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; +} struct pipe_context * cell_create_context(struct pipe_screen *screen, - struct cell_winsys *cws) + void *priv ) { struct cell_context *cell; uint i; @@ -114,14 +135,18 @@ cell_create_context(struct pipe_screen *screen, memset(cell, 0, sizeof(*cell)); - cell->winsys = cws; - cell->pipe.winsys = screen->winsys; + cell->winsys = NULL; /* XXX: fixme - get this from screen? */ + cell->pipe.winsys = NULL; cell->pipe.screen = screen; + cell->pipe.priv = priv; cell->pipe.destroy = cell_destroy_context; - cell->pipe.clear = cell_clear_surface; + cell->pipe.clear = cell_clear; cell->pipe.flush = cell_flush; + cell->pipe.is_texture_referenced = cell_is_texture_referenced; + cell->pipe.is_buffer_referenced = cell_is_buffer_referenced; + #if 0 cell->pipe.begin_query = cell_begin_query; cell->pipe.end_query = cell_end_query;