cell: assorted compilation fixes
authorBrian Paul <brianp@vmware.com>
Fri, 21 May 2010 15:47:00 +0000 (09:47 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 21 May 2010 15:47:00 +0000 (09:47 -0600)
src/gallium/drivers/cell/ppu/cell_draw_arrays.c
src/gallium/drivers/cell/ppu/cell_fence.c
src/gallium/drivers/cell/ppu/cell_texture.c
src/gallium/drivers/cell/ppu/cell_vbuf.c

index b50a30bee803dc15cde37851aa73e21779fd6af6..6a1e4d8a646a976bff9104ec54d53e6432e10115 100644 (file)
@@ -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 );
 }
index eac798e8cf6dfcdb9d85778e6be191f391e526e7..34ca864155b32576d49cb0c8af5048c25fce4df8 100644 (file)
@@ -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)
index d08334d892b7592d95a4d1a8c17c27ec9db81e11..b3042df77922c556948e7e85e5deb686f16756ca 100644 (file)
@@ -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;
index cfaffb52a8504359e7f734ea4f703c8d9f18ad73..37b719564823fc9ca6ec5f5d95690818b186ffdf 100644 (file)
@@ -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;