summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c60
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c3
2 files changed, 15 insertions, 48 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index f0e8350a4a..7c02765313 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -80,15 +80,6 @@ softpipe_texture_layout(struct softpipe_texture * spt)
}
-/* XXX temporary */
-static struct pipe_texture *
-softpipe_texture_create(struct pipe_context *pipe,
- const struct pipe_texture *templat)
-{
- return pipe->screen->texture_create(pipe->screen, templat);
-}
-
-
static struct pipe_texture *
softpipe_texture_create_screen(struct pipe_screen *screen,
const struct pipe_texture *templat)
@@ -119,14 +110,6 @@ softpipe_texture_create_screen(struct pipe_screen *screen,
}
-/* XXX temporary */
-static void
-softpipe_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
-{
- return pipe->screen->texture_release(pipe->screen, pt);
-}
-
-
static void
softpipe_texture_release_screen(struct pipe_screen *screen,
struct pipe_texture **pt)
@@ -153,33 +136,6 @@ softpipe_texture_release_screen(struct pipe_screen *screen,
}
-static void
-softpipe_texture_update(struct pipe_context *pipe,
- struct pipe_texture *texture)
-{
- struct softpipe_context *softpipe = softpipe_context(pipe);
- uint unit;
- for (unit = 0; unit < PIPE_MAX_SAMPLERS; unit++) {
- if (softpipe->texture[unit] == texture) {
- sp_flush_tile_cache(softpipe, softpipe->tex_cache[unit]);
- }
- }
-}
-
-
-/**
- * Called via pipe->get_tex_surface()
- */
-/* XXX temporary */
-static struct pipe_surface *
-softpipe_get_tex_surface(struct pipe_context *pipe,
- struct pipe_texture *pt,
- unsigned face, unsigned level, unsigned zslice)
-{
- return pipe->screen->get_tex_surface(pipe->screen, pt, face, level, zslice);
-}
-
-
static struct pipe_surface *
softpipe_get_tex_surface_screen(struct pipe_screen *screen,
struct pipe_texture *pt,
@@ -217,14 +173,24 @@ softpipe_get_tex_surface_screen(struct pipe_screen *screen,
}
+static void
+softpipe_texture_update(struct pipe_context *pipe,
+ struct pipe_texture *texture)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+ uint unit;
+ for (unit = 0; unit < PIPE_MAX_SAMPLERS; unit++) {
+ if (softpipe->texture[unit] == texture) {
+ sp_flush_tile_cache(softpipe, softpipe->tex_cache[unit]);
+ }
+ }
+}
+
void
softpipe_init_texture_funcs( struct softpipe_context *softpipe )
{
- softpipe->pipe.texture_create = softpipe_texture_create;
- softpipe->pipe.texture_release = softpipe_texture_release;
softpipe->pipe.texture_update = softpipe_texture_update;
- softpipe->pipe.get_tex_surface = softpipe_get_tex_surface;
}
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 0ff93c5527..4caf2dd3fc 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -489,6 +489,7 @@ sp_get_cached_tile_tex(struct pipe_context *pipe,
struct softpipe_tile_cache *tc, int x, int y, int z,
int face, int level)
{
+ struct pipe_screen *screen = pipe->screen;
/* tile pos in framebuffer: */
const int tile_x = x & ~(TILE_SIZE - 1);
const int tile_y = y & ~(TILE_SIZE - 1);
@@ -514,7 +515,7 @@ sp_get_cached_tile_tex(struct pipe_context *pipe,
if (tc->tex_surf_map)
pipe_surface_unmap(tc->tex_surf);
- tc->tex_surf = pipe->get_tex_surface(pipe, tc->texture, face, level, z);
+ tc->tex_surf = screen->get_tex_surface(screen, tc->texture, face, level, z);
tc->tex_surf_map = pipe_surface_map(tc->tex_surf);
tc->tex_face = face;