Mesa (master): i915g: Cleanup texture init functions a bit

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Mon Aug 31 15:52:46 UTC 2009


Module: Mesa
Branch: master
Commit: 4224bda684aaee92d27e09c5545a7094cda0ae76
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4224bda684aaee92d27e09c5545a7094cda0ae76

Author: Jakob Bornecrantz <wallbraker at gmail.com>
Date:   Sat Aug 29 22:02:49 2009 +0100

i915g: Cleanup texture init functions a bit

---

 src/gallium/drivers/i915simple/i915_context.c |    1 -
 src/gallium/drivers/i915simple/i915_screen.c  |    2 +-
 src/gallium/drivers/i915simple/i915_texture.c |   18 ++++++------------
 src/gallium/drivers/i915simple/i915_texture.h |   11 ++---------
 4 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/src/gallium/drivers/i915simple/i915_context.c b/src/gallium/drivers/i915simple/i915_context.c
index 132ed31..b77a831 100644
--- a/src/gallium/drivers/i915simple/i915_context.c
+++ b/src/gallium/drivers/i915simple/i915_context.c
@@ -209,7 +209,6 @@ struct pipe_context *i915_create_context( struct pipe_screen *screen,
    i915_init_surface_functions(i915);
    i915_init_state_functions(i915);
    i915_init_flush_functions(i915);
-   i915_init_texture_functions(i915);
 
    draw_install_aaline_stage(i915->draw, &i915->base);
    draw_install_aapoint_stage(i915->draw, &i915->base);
diff --git a/src/gallium/drivers/i915simple/i915_screen.c b/src/gallium/drivers/i915simple/i915_screen.c
index c9a9e90..a7a95ed 100644
--- a/src/gallium/drivers/i915simple/i915_screen.c
+++ b/src/gallium/drivers/i915simple/i915_screen.c
@@ -342,7 +342,7 @@ i915_create_screen(struct pipe_winsys *winsys, uint pci_id)
    i915screen->base.transfer_map = i915_transfer_map;
    i915screen->base.transfer_unmap = i915_transfer_unmap;
 
-   i915_init_screen_texture_functions(&i915screen->base);
+   i915_init_screen_texture_functions(i915screen);
    u_simple_screen_init(&i915screen->base);
 
    return &i915screen->base;
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 0dc6a54..975602a 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -718,12 +718,6 @@ i915_texture_blanket(struct pipe_screen * screen,
    return &tex->base;
 }
 
-void
-i915_init_texture_functions(struct i915_context *i915)
-{
-//   i915->pipe.texture_update = i915_texture_update;
-}
-
 static void
 i915_tex_surface_destroy(struct pipe_surface *surf)
 {
@@ -732,13 +726,13 @@ i915_tex_surface_destroy(struct pipe_surface *surf)
 }
 
 void
-i915_init_screen_texture_functions(struct pipe_screen *screen)
+i915_init_screen_texture_functions(struct i915_screen *is)
 {
-   screen->texture_create = i915_texture_create;
-   screen->texture_destroy = i915_texture_destroy;
-   screen->get_tex_surface = i915_get_tex_surface;
-   screen->texture_blanket = i915_texture_blanket;
-   screen->tex_surface_destroy = i915_tex_surface_destroy;
+   is->base.texture_create = i915_texture_create;
+   is->base.texture_destroy = i915_texture_destroy;
+   is->base.get_tex_surface = i915_get_tex_surface;
+   is->base.texture_blanket = i915_texture_blanket;
+   is->base.tex_surface_destroy = i915_tex_surface_destroy;
 }
 
 boolean i915_get_texture_buffer( struct pipe_texture *texture,
diff --git a/src/gallium/drivers/i915simple/i915_texture.h b/src/gallium/drivers/i915simple/i915_texture.h
index 7225016..51a1dd9 100644
--- a/src/gallium/drivers/i915simple/i915_texture.h
+++ b/src/gallium/drivers/i915simple/i915_texture.h
@@ -28,16 +28,9 @@
 #ifndef I915_TEXTURE_H
 #define I915_TEXTURE_H
 
-struct i915_context;
-struct pipe_screen;
-
+struct i915_screen;
 
 extern void
-i915_init_texture_functions(struct i915_context *i915);
-
-
-extern void
-i915_init_screen_texture_functions(struct pipe_screen *screen);
-
+i915_init_screen_texture_functions(struct i915_screen *is);
 
 #endif /* I915_TEXTURE_H */




More information about the mesa-commit mailing list