nv30: update miptree stuff for texturing
authorPatrice Mandin <pmandin@caramail.com>
Tue, 18 Mar 2008 12:20:59 +0000 (13:20 +0100)
committerPatrice Mandin <pmandin@caramail.com>
Tue, 18 Mar 2008 12:20:59 +0000 (13:20 +0100)
src/gallium/drivers/nv30/nv30_context.c
src/gallium/drivers/nv30/nv30_context.h
src/gallium/drivers/nv30/nv30_miptree.c
src/gallium/drivers/nv30/nv30_screen.c

index b3906e28e3f6472c1e73aa0548450d6649d54659..cdd662a9f195e58a43d863120f847794ffa60491 100644 (file)
@@ -234,6 +234,7 @@ nv30_create(struct pipe_screen *screen, unsigned pctx_id)
        nv30_init_query_functions(nv30);
        nv30_init_surface_functions(nv30);
        nv30_init_state_functions(nv30);
+       nv30_init_miptree_functions(nv30);
 
        nv30->draw = draw_create();
        assert(nv30->draw);
index 21cffc6d274371ccac2314da7b9f506ffa4d6714..0ee6cfdb33934ef2f38227487c6cd4e919f570b2 100644 (file)
@@ -91,9 +91,11 @@ nv30_context(struct pipe_context *pipe)
 
 extern void nv30_init_state_functions(struct nv30_context *nv30);
 extern void nv30_init_surface_functions(struct nv30_context *nv30);
-extern void nv30_init_miptree_functions(struct pipe_screen *screen);
+extern void nv30_init_miptree_functions(struct nv30_context *nv30);
 extern void nv30_init_query_functions(struct nv30_context *nv30);
 
+extern void nv30_screen_init_miptree_functions(struct pipe_screen *pscreen);
+
 /* nv30_draw.c */
 extern struct draw_stage *nv30_draw_render_stage(struct nv30_context *nv30);
 
index 19945e9ab873080c74eebe667487e16c3684d657..f5659353ea555a64735db73d4ce6297d5a4c02d9 100644 (file)
@@ -55,7 +55,7 @@ nv30_miptree_layout(struct nv30_miptree *nv30mt)
 }
 
 static struct pipe_texture *
-nv30_miptree_create(struct pipe_screen *screen, struct pipe_texture *pt)
+nv30_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
 {
        struct pipe_winsys *ws = screen->winsys;
        struct nv30_miptree *mt;
@@ -99,6 +99,11 @@ nv30_miptree_release(struct pipe_screen *screen, struct pipe_texture **pt)
        }
 }
 
+static void
+nv30_miptree_update(struct pipe_context *pipe, struct pipe_texture *mt)
+{
+}
+
 static struct pipe_surface *
 nv30_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
                         unsigned face, unsigned level, unsigned zslice)
@@ -128,13 +133,18 @@ nv30_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
 
        return ps;
 }
+
 void
-nv30_init_miptree_functions(struct pipe_screen *screen)
+nv30_init_miptree_functions(struct nv30_context *nv30)
 {
-       struct nv30_screen *nv30screen = nv30_screen(screen);
+       nv30->pipe.texture_update = nv30_miptree_update;
+}
 
-       nv30screen->screen.texture_create = nv30_miptree_create;
-       nv30screen->screen.texture_release = nv30_miptree_release;
-       nv30screen->screen.get_tex_surface = nv30_miptree_surface_get;
+void
+nv30_screen_init_miptree_functions(struct pipe_screen *pscreen)
+{
+       pscreen->texture_create = nv30_miptree_create;
+       pscreen->texture_release = nv30_miptree_release;
+       pscreen->get_tex_surface = nv30_miptree_surface_get;
 }
 
index 39f2ac1af5c8b770a78281a158b1136269297522..3ca50e4fbf46d24707917b43c0638176714a5267 100644 (file)
@@ -147,7 +147,8 @@ nv30_screen_create(struct pipe_winsys *winsys, struct nouveau_winsys *nvws,
        nv30screen->screen.is_format_supported = 
                nv30_screen_is_format_supported;
 
-       nv30_init_miptree_functions(&nv30screen->screen);
+       nv30_screen_init_miptree_functions(&nv30screen->screen);
+
        return &nv30screen->screen;
 }