summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_texture.c30
-rw-r--r--src/gallium/drivers/failover/fo_context.c4
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c28
-rw-r--r--src/gallium/drivers/i965simple/brw_tex_layout.c30
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c60
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c3
6 files changed, 18 insertions, 137 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c
index e6398a85fa5..28cadad6ed2 100644
--- a/src/gallium/drivers/cell/ppu/cell_texture.c
+++ b/src/gallium/drivers/cell/ppu/cell_texture.c
@@ -80,14 +80,6 @@ cell_texture_layout(struct cell_texture * spt)
static struct pipe_texture *
-cell_texture_create(struct pipe_context *pipe,
- const struct pipe_texture *templat)
-{
- return pipe->screen->texture_create(pipe->screen, templat);
-
-}
-
-static struct pipe_texture *
cell_texture_create_screen(struct pipe_screen *screen,
const struct pipe_texture *templat)
{
@@ -117,13 +109,6 @@ cell_texture_create_screen(struct pipe_screen *screen,
static void
-cell_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
-{
- return pipe->screen->texture_release(pipe->screen, pt);
-}
-
-
-static void
cell_texture_release_screen(struct pipe_screen *screen,
struct pipe_texture **pt)
{
@@ -157,18 +142,6 @@ cell_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
}
-/**
- * Called via pipe->get_tex_surface()
- */
-static struct pipe_surface *
-cell_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 *
cell_get_tex_surface_screen(struct pipe_screen *screen,
struct pipe_texture *pt,
@@ -294,10 +267,7 @@ cell_update_texture_mapping(struct cell_context *cell)
void
cell_init_texture_functions(struct cell_context *cell)
{
- cell->pipe.texture_create = cell_texture_create;
- cell->pipe.texture_release = cell_texture_release;
cell->pipe.texture_update = cell_texture_update;
- cell->pipe.get_tex_surface = cell_get_tex_surface;
}
void
diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c
index f559cc0d479..afc0d7eb1ec 100644
--- a/src/gallium/drivers/failover/fo_context.c
+++ b/src/gallium/drivers/failover/fo_context.c
@@ -143,10 +143,12 @@ struct pipe_context *failover_create( struct pipe_context *hw,
failover->pipe.surface_copy = hw->surface_copy;
failover->pipe.surface_fill = hw->surface_fill;
+#if 0
failover->pipe.texture_create = hw->texture_create;
failover->pipe.texture_release = hw->texture_release;
- failover->pipe.texture_update = hw->texture_update;
failover->pipe.get_tex_surface = hw->get_tex_surface;
+#endif
+ failover->pipe.texture_update = hw->texture_update;
failover->pipe.flush = hw->flush;
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 3c9509dee34..9cdf3418a96 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -511,14 +511,6 @@ i915_texture_create_screen(struct pipe_screen *screen,
}
-static struct pipe_texture *
-i915_texture_create(struct pipe_context *pipe,
- const struct pipe_texture *templat)
-{
- return pipe->screen->texture_create(pipe->screen, templat);
-}
-
-
static void
i915_texture_release_screen(struct pipe_screen *screen,
struct pipe_texture **pt)
@@ -551,13 +543,6 @@ i915_texture_release_screen(struct pipe_screen *screen,
static void
-i915_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
-{
- i915_texture_release_screen(pipe->screen, pt);
-}
-
-
-static void
i915_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
{
/* no-op? */
@@ -606,26 +591,13 @@ i915_get_tex_surface_screen(struct pipe_screen *screen,
}
-static struct pipe_surface *
-i915_get_tex_surface(struct pipe_context *pipe,
- struct pipe_texture *pt,
- unsigned face, unsigned level, unsigned zslice)
-{
- return i915_get_tex_surface_screen(pipe->screen, pt, face, level, zslice);
-}
-
-
void
i915_init_texture_functions(struct i915_context *i915)
{
- i915->pipe.texture_create = i915_texture_create;
- i915->pipe.texture_release = i915_texture_release;
i915->pipe.texture_update = i915_texture_update;
- i915->pipe.get_tex_surface = i915_get_tex_surface;
}
-
void
i915_init_screen_texture_functions(struct pipe_screen *screen)
{
diff --git a/src/gallium/drivers/i965simple/brw_tex_layout.c b/src/gallium/drivers/i965simple/brw_tex_layout.c
index 9753c50143a..b24ac87c378 100644
--- a/src/gallium/drivers/i965simple/brw_tex_layout.c
+++ b/src/gallium/drivers/i965simple/brw_tex_layout.c
@@ -299,14 +299,6 @@ static boolean brw_miptree_layout(struct brw_texture *tex)
static struct pipe_texture *
-brw_texture_create(struct pipe_context *pipe,
- const struct pipe_texture *templat)
-{
- return pipe->screen->texture_create(pipe->screen, templat);
-}
-
-
-static struct pipe_texture *
brw_texture_create_screen(struct pipe_screen *screen,
const struct pipe_texture *templat)
{
@@ -334,13 +326,6 @@ brw_texture_create_screen(struct pipe_screen *screen,
static void
-brw_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
-{
- pipe->screen->texture_release(pipe->screen, pt);
-}
-
-
-static void
brw_texture_release_screen(struct pipe_screen *screen,
struct pipe_texture **pt)
{
@@ -379,18 +364,6 @@ brw_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
}
-/*
- * XXX note: same as code in sp_surface.c
- */
-static struct pipe_surface *
-brw_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 *
brw_get_tex_surface_screen(struct pipe_screen *screen,
struct pipe_texture *pt,
@@ -433,10 +406,7 @@ brw_get_tex_surface_screen(struct pipe_screen *screen,
void
brw_init_texture_functions(struct brw_context *brw)
{
- brw->pipe.texture_create = brw_texture_create;
- brw->pipe.texture_release = brw_texture_release;
brw->pipe.texture_update = brw_texture_update;
- brw->pipe.get_tex_surface = brw_get_tex_surface;
}
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index f0e8350a4a1..7c027653135 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 0ff93c55277..4caf2dd3fc9 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;