summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2008-03-18 13:20:59 +0100
committerPatrice Mandin <[email protected]>2008-03-18 13:20:59 +0100
commita514aeb77899816d82c5b31f3bf2206d82d68893 (patch)
treebdf39eb1c1b3e0c1f01da2c76c88799e9bd40233
parent3394ba65b10a1ec01345c37b7888e18dcfdbe808 (diff)
nv30: update miptree stuff for texturing
-rw-r--r--src/gallium/drivers/nv30/nv30_context.c1
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h4
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c22
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.c3
4 files changed, 22 insertions, 8 deletions
diff --git a/src/gallium/drivers/nv30/nv30_context.c b/src/gallium/drivers/nv30/nv30_context.c
index b3906e28e3f..cdd662a9f19 100644
--- a/src/gallium/drivers/nv30/nv30_context.c
+++ b/src/gallium/drivers/nv30/nv30_context.c
@@ -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);
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index 21cffc6d274..0ee6cfdb339 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -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);
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index 19945e9ab87..f5659353ea5 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -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;
}
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index 39f2ac1af5c..3ca50e4fbf4 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -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;
}