From: Brian Paul Date: Fri, 21 May 2010 15:47:00 +0000 (-0600) Subject: cell: assorted compilation fixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c6882f8c1320a5e62fd0c7edeea588712ff6dda;p=mesa.git cell: assorted compilation fixes --- diff --git a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c index b50a30bee80..6a1e4d8a646 100644 --- a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c +++ b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c @@ -103,7 +103,7 @@ cell_draw_range_elements(struct pipe_context *pipe, draw_set_mapped_vertex_buffer(draw, i, NULL); } if (indexBuffer) { - draw_set_mapped_element_buffer(draw, 0, NULL); + draw_set_mapped_element_buffer(draw, 0, 0, NULL); } /* @@ -122,7 +122,7 @@ cell_draw_elements(struct pipe_context *pipe, unsigned mode, unsigned start, unsigned count) { cell_draw_range_elements( pipe, indexBuffer, - indexSize, indeBias, + indexSize, indexBias, 0, 0xffffffff, mode, start, count ); } diff --git a/src/gallium/drivers/cell/ppu/cell_fence.c b/src/gallium/drivers/cell/ppu/cell_fence.c index eac798e8cf6..34ca864155b 100644 --- a/src/gallium/drivers/cell/ppu/cell_fence.c +++ b/src/gallium/drivers/cell/ppu/cell_fence.c @@ -123,7 +123,7 @@ cell_free_fenced_buffers(struct cell_context *cell, while (node) { struct cell_buffer_node *next = node->next; assert(node->buffer); - pipe_buffer_unmap(ps, node->buffer); + /* XXX need this? pipe_buffer_unmap(ps, node->buffer);*/ #if 0 printf("Unref buffer %p\n", node->buffer); if (node->buffer->reference.count == 1) diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c index d08334d892b..b3042df7792 100644 --- a/src/gallium/drivers/cell/ppu/cell_texture.c +++ b/src/gallium/drivers/cell/ppu/cell_texture.c @@ -34,7 +34,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "util/u_inlines.h" - +#include "util/u_transfer.h" #include "util/u_format.h" #include "util/u_math.h" #include "util/u_memory.h" @@ -42,7 +42,7 @@ #include "cell_context.h" #include "cell_screen.h" #include "cell_state.h" -#include "cell_resource.h" +#include "cell_texture.h" #include "state_tracker/sw_winsys.h" @@ -155,9 +155,9 @@ fail: static void -cell_resource_destroy(struct pipe_resource *pt) +cell_resource_destroy(struct pipe_screen *scrn, struct pipe_resource *pt) { - struct cell_screen *screen = cell_screen(pt->screen); + struct cell_screen *screen = cell_screen(scrn); struct sw_winsys *winsys = screen->winsys; struct cell_resource *ct = cell_resource(pt); @@ -365,10 +365,10 @@ cell_get_transfer(struct pipe_context *ctx, { struct cell_resource *ct = cell_resource(resource); struct cell_transfer *ctrans; - enum pipe_format *format = resource->format; + enum pipe_format format = resource->format; assert(resource); - assert(level <= resource->last_level); + assert(sr.level <= resource->last_level); /* make sure the requested region is in the image bounds */ assert(box->x + box->width <= u_minify(resource->width0, sr.level)); @@ -612,6 +612,24 @@ cell_user_buffer_create(struct pipe_screen *screen, } +static struct pipe_resource * +cell_resource_from_handle(struct pipe_screen *screen, + const struct pipe_resource *templat, + struct winsys_handle *handle) +{ + /* XXX todo */ + return NULL; +} + + +static boolean +cell_resource_get_handle(struct pipe_screen *scree, + struct pipe_resource *tex, + struct winsys_handle *handle) +{ + /* XXX todo */ + return FALSE; +} void @@ -630,7 +648,7 @@ cell_init_screen_texture_funcs(struct pipe_screen *screen) } void -cell_init_transfer_funcs(struct cell_context *cell) +cell_init_texture_transfer_funcs(struct cell_context *cell) { cell->pipe.get_transfer = cell_get_transfer; cell->pipe.transfer_destroy = cell_transfer_destroy; diff --git a/src/gallium/drivers/cell/ppu/cell_vbuf.c b/src/gallium/drivers/cell/ppu/cell_vbuf.c index cfaffb52a85..37b71956482 100644 --- a/src/gallium/drivers/cell/ppu/cell_vbuf.c +++ b/src/gallium/drivers/cell/ppu/cell_vbuf.c @@ -165,9 +165,9 @@ cell_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim) static void -cell_vbuf_draw(struct vbuf_render *vbr, - const ushort *indices, - uint nr_indices) +cell_vbuf_draw_elements(struct vbuf_render *vbr, + const ushort *indices, + uint nr_indices) { struct cell_vbuf_render *cvbr = cell_vbuf_render(vbr); struct cell_context *cell = cvbr->cell; @@ -319,7 +319,7 @@ cell_init_vbuf(struct cell_context *cell) cell->vbuf_render->base.map_vertices = cell_vbuf_map_vertices; cell->vbuf_render->base.unmap_vertices = cell_vbuf_unmap_vertices; cell->vbuf_render->base.set_primitive = cell_vbuf_set_primitive; - cell->vbuf_render->base.draw = cell_vbuf_draw; + cell->vbuf_render->base.draw_elements = cell_vbuf_draw_elements; cell->vbuf_render->base.release_vertices = cell_vbuf_release_vertices; cell->vbuf_render->base.destroy = cell_vbuf_destroy;