r600g: make blit functions static (private)
authorMarek Olšák <maraeo@gmail.com>
Fri, 4 Jun 2010 00:57:32 +0000 (02:57 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 4 Jun 2010 01:04:16 +0000 (03:04 +0200)
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/r600/r600_context.c
src/gallium/drivers/r600/r600_context.h
src/gallium/drivers/r600/r600_screen.h

index 52a2921d47d1e7a8363c8544c1db8f840911f6d5..974ceef15f5abac9f710c0b3ab3d5b47c7e33004 100644 (file)
 #include "r600_screen.h"
 #include "r600_context.h"
 
-static void r600_blitter_save_states(struct pipe_context *ctx)
+static void r600_blitter_save_states(struct r600_context *rctx)
 {
-       struct r600_context *rctx = r600_context(ctx);
-
        util_blitter_save_blend(rctx->blitter,
                                        rctx->draw->state[R600_BLEND]);
        util_blitter_save_depth_stencil_alpha(rctx->blitter,
@@ -52,43 +50,51 @@ static void r600_blitter_save_states(struct pipe_context *ctx)
                                        &rctx->viewport);
 }
 
-void r600_clear(struct pipe_context *ctx, unsigned buffers,
-               const float *rgba, double depth, unsigned stencil)
+static void r600_clear(struct pipe_context *ctx, unsigned buffers,
+                      const float *rgba, double depth, unsigned stencil)
 {
        struct r600_context *rctx = r600_context(ctx);
        struct pipe_framebuffer_state *fb = &rctx->fb_state;
 
-       r600_blitter_save_states(ctx);
+       r600_blitter_save_states(rctx);
        util_blitter_clear(rctx->blitter, fb->width, fb->height,
                                fb->nr_cbufs, buffers, rgba, depth,
                                stencil);
 }
 
-void r600_clear_render_target(struct pipe_context *pipe,
-                             struct pipe_surface *dst,
-                             const float *rgba,
-                             unsigned dstx, unsigned dsty,
-                             unsigned width, unsigned height)
+static void r600_clear_render_target(struct pipe_context *pipe,
+                                    struct pipe_surface *dst,
+                                    const float *rgba,
+                                    unsigned dstx, unsigned dsty,
+                                    unsigned width, unsigned height)
+{
+}
+
+static void r600_clear_depth_stencil(struct pipe_context *pipe,
+                                    struct pipe_surface *dst,
+                                    unsigned clear_flags,
+                                    double depth,
+                                    unsigned stencil,
+                                    unsigned dstx, unsigned dsty,
+                                    unsigned width, unsigned height)
 {
 }
 
-void r300_clear_depth_stencil(struct pipe_context *pipe,
-                             struct pipe_surface *dst,
-                             unsigned clear_flags,
-                             double depth,
-                             unsigned stencil,
-                             unsigned dstx, unsigned dsty,
-                             unsigned width, unsigned height)
+static void r600_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)
 {
 }
 
-void r600_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)
+void r600_init_blit_functions(struct r600_context *rctx)
 {
+       rctx->context.clear = r600_clear;
+       rctx->context.clear_render_target = r600_clear_render_target;
+       rctx->context.clear_depth_stencil = r600_clear_depth_stencil;
+       rctx->context.resource_copy_region = r600_resource_copy_region;
 }
index 22fffc4f47b85ad684430f05520d697d2009b06f..0a7efe3bfb9463df6a0a46c1b1870e7df139026d 100644 (file)
@@ -73,7 +73,6 @@ struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv)
        rctx->context.screen = screen;
        rctx->context.priv = priv;
        rctx->context.destroy = r600_destroy_context;
-       rctx->context.clear = r600_clear;
        rctx->context.draw_arrays = r600_draw_arrays;
        rctx->context.draw_elements = r600_draw_elements;
        rctx->context.draw_range_elements = r600_draw_range_elements;
@@ -83,6 +82,7 @@ struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv)
        rctx->screen = rscreen;
        rctx->rw = rscreen->rw;
 
+       r600_init_blit_functions(rctx);
        r600_init_query_functions(rctx);
        r600_init_state_functions(rctx);
        r600_init_context_resource_functions(rctx);
index 464209f4f4923e9c801d3b1f98fef0c682f15416..f27ff58ed46352fd2a77096a049fc4eeeaf44abe 100644 (file)
@@ -85,6 +85,7 @@ void r600_draw_range_elements(struct pipe_context *ctx,
                unsigned max_index, unsigned mode,
                unsigned start, unsigned count);
 
+void r600_init_blit_functions(struct r600_context *rctx);
 void r600_init_state_functions(struct r600_context *rctx);
 void r600_init_query_functions(struct r600_context* rctx);
 struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv);
index 49f6f50ee62e3729a5622b992cf3d80ad17debc1..0a0286d96bcc742ef6674aa67ed09b4a7447eac2 100644 (file)
@@ -84,33 +84,6 @@ void r600_texture_transfer_unmap(struct pipe_context *ctx,
                                 struct pipe_transfer* transfer);
 
 
-/* Blit functions. */
-void r600_clear(struct pipe_context *ctx,
-               unsigned buffers,
-               const float *rgba,
-               double depth,
-               unsigned stencil);
-void r600_clear_render_target(struct pipe_context *pipe,
-                             struct pipe_surface *dst,
-                             const float *rgba,
-                             unsigned dstx, unsigned dsty,
-                             unsigned width, unsigned height);
-void r300_clear_depth_stencil(struct pipe_context *pipe,
-                             struct pipe_surface *dst,
-                             unsigned clear_flags,
-                             double depth,
-                             unsigned stencil,
-                             unsigned dstx, unsigned dsty,
-                             unsigned width, unsigned height);
-void r600_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);
-
 /* helpers */
 int r600_conv_pipe_format(unsigned pformat, unsigned *format);
 int r600_conv_pipe_prim(unsigned pprim, unsigned *prim);