rbug: fix breakage due to interface changes
authorRoland Scheidegger <sroland@vmware.com>
Fri, 21 May 2010 18:52:01 +0000 (20:52 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 21 May 2010 18:52:01 +0000 (20:52 +0200)
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/rbug/rbug_screen.c

index 59f005ec16ccb99bccf49ea178d07056f9aa0646..7e032c64e7371142d9a45ae6360beab698a3b11c 100644 (file)
@@ -752,55 +752,67 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
                             buffers);
 }
 static void
-rbug_surface_copy(struct pipe_context *_pipe,
-                  struct pipe_surface *_dst,
-                  unsigned dstx,
-                  unsigned dsty,
-                  struct pipe_surface *_src,
-                  unsigned srcx,
-                  unsigned srcy,
-                  unsigned width,
-                  unsigned height)
+rbug_resource_copy_region(struct pipe_context *_pipe,
+                          struct pipe_resource *_dst,
+                          struct pipe_subresource subdst,
+                          unsigned dstx,
+                          unsigned dsty,
+                          unsigned dstz,
+                          struct pipe_resource *_src,
+                          struct pipe_subresource subsrc,
+                          unsigned srcx,
+                          unsigned srcy,
+                          unsigned srcz,
+                          unsigned width,
+                          unsigned height)
 {
    struct rbug_context *rb_pipe = rbug_context(_pipe);
-   struct rbug_surface *rb_surface_dst = rbug_surface(_dst);
-   struct rbug_surface *rb_surface_src = rbug_surface(_src);
+   struct rbug_resource *rb_resource_dst = rbug_resource(_dst);
+   struct rbug_resource *rb_resource_src = rbug_resource(_src);
    struct pipe_context *pipe = rb_pipe->pipe;
-   struct pipe_surface *dst = rb_surface_dst->surface;
-   struct pipe_surface *src = rb_surface_src->surface;
-
-   pipe->surface_copy(pipe,
-                      dst,
-                      dstx,
-                      dsty,
-                      src,
-                      srcx,
-                      srcy,
-                      width,
-                      height);
+   struct pipe_resource *dst = rb_resource_dst->resource;
+   struct pipe_resource *src = rb_resource_src->resource;
+
+   pipe->resource_copy_region(pipe,
+                              dst,
+                              subdst,
+                              dstx,
+                              dsty,
+                              dstz,
+                              src,
+                              subsrc,
+                              srcx,
+                              srcy,
+                              srcz,
+                              width,
+                              height);
 }
 
 static void
-rbug_surface_fill(struct pipe_context *_pipe,
-                  struct pipe_surface *_dst,
-                  unsigned dstx,
-                  unsigned dsty,
-                  unsigned width,
-                  unsigned height,
-                  unsigned value)
+rbug_resource_fill_region(struct pipe_context *_pipe,
+                          struct pipe_resource *_dst,
+                          struct pipe_subresource subdst,
+                          unsigned dstx,
+                          unsigned dsty,
+                          unsigned dstz,
+                          unsigned width,
+                          unsigned height,
+                          unsigned value)
 {
    struct rbug_context *rb_pipe = rbug_context(_pipe);
-   struct rbug_surface *rb_surface_dst = rbug_surface(_dst);
+   struct rbug_resource *rb_resource_dst = rbug_resource(_dst);
    struct pipe_context *pipe = rb_pipe->pipe;
-   struct pipe_surface *dst = rb_surface_dst->surface;
-
-   pipe->surface_fill(pipe,
-                      dst,
-                      dstx,
-                      dsty,
-                      width,
-                      height,
-                      value);
+   struct pipe_resource *dst = rb_resource_dst->resource;
+
+   pipe->resource_fill_region(pipe,
+                              dst,
+                              subdst,
+                              dstx,
+                              dsty,
+                              dstz,
+                              width,
+                              height,
+                              value);
 }
 
 static void
@@ -1050,8 +1062,8 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    rb_pipe->base.set_fragment_sampler_views = rbug_set_fragment_sampler_views;
    rb_pipe->base.set_vertex_sampler_views = rbug_set_vertex_sampler_views;
    rb_pipe->base.set_vertex_buffers = rbug_set_vertex_buffers;
-   rb_pipe->base.surface_copy = rbug_surface_copy;
-   rb_pipe->base.surface_fill = rbug_surface_fill;
+   rb_pipe->base.resource_copy_region = rbug_resource_copy_region;
+   rb_pipe->base.resource_fill_region = rbug_resource_fill_region;
    rb_pipe->base.clear = rbug_clear;
    rb_pipe->base.flush = rbug_flush;
    rb_pipe->base.is_resource_referenced = rbug_is_resource_referenced;
index 2b60af2302a6fa3d21bc42aa6e1d1bea13c08f06..b9f32ee6a9b83a85ce11d5ee30bbb12887fdd421 100644 (file)
@@ -94,6 +94,7 @@ static boolean
 rbug_screen_is_format_supported(struct pipe_screen *_screen,
                                 enum pipe_format format,
                                 enum pipe_texture_target target,
+                                unsigned sample_count,
                                 unsigned tex_usage,
                                 unsigned geom_flags)
 {
@@ -103,6 +104,7 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen,
    return screen->is_format_supported(screen,
                                       format,
                                       target,
+                                      sample_count,
                                       tex_usage,
                                       geom_flags);
 }