summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-26 19:31:22 -0700
committerBrian <[email protected]>2008-02-26 19:31:22 -0700
commit4da19dbcaa9f3e2d20fffd0145bf0bc756dd7542 (patch)
treeefd946fe548caad53bec8b64a6152c3d5f621149 /src/gallium/drivers
parenta6044bdf74bae96f05310ad6e39942f172b8ab02 (diff)
gallium: remove pipe parameter from pipe_texture_reference()
Added pipe field to pipe_texture (temporary, see comments). First step toward context-less texture creation...
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_pipe_state.c3
-rw-r--r--src/gallium/drivers/i915simple/i915_state.c3
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c1
-rw-r--r--src/gallium/drivers/i965simple/brw_state.c3
-rw-r--r--src/gallium/drivers/softpipe/sp_state_sampler.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c1
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c2
7 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_pipe_state.c b/src/gallium/drivers/cell/ppu/cell_pipe_state.c
index 95bfc29fbeb..075e0a0c471 100644
--- a/src/gallium/drivers/cell/ppu/cell_pipe_state.c
+++ b/src/gallium/drivers/cell/ppu/cell_pipe_state.c
@@ -242,8 +242,7 @@ cell_set_sampler_texture(struct pipe_context *pipe,
draw_flush(cell->draw);
- pipe_texture_reference(pipe,
- (struct pipe_texture **) &cell->texture[sampler],
+ pipe_texture_reference((struct pipe_texture **) &cell->texture[sampler],
texture);
cell_update_texture_mapping(cell);
diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c
index 9df0e125406..27af46bea03 100644
--- a/src/gallium/drivers/i915simple/i915_state.c
+++ b/src/gallium/drivers/i915simple/i915_state.c
@@ -532,8 +532,7 @@ static void i915_set_sampler_texture(struct pipe_context *pipe,
{
struct i915_context *i915 = i915_context(pipe);
- pipe_texture_reference(pipe,
- (struct pipe_texture **) &i915->texture[sampler],
+ pipe_texture_reference((struct pipe_texture **) &i915->texture[sampler],
texture);
i915->dirty |= I915_NEW_TEXTURE;
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 1b415a94d40..7fcf4332e14 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -489,6 +489,7 @@ i915_texture_create(struct pipe_context *pipe,
tex->base = *templat;
tex->base.refcount = 1;
+ tex->base.pipe = pipe;
if (i915->flags.is_i945 ? i945_miptree_layout(pipe, tex) :
i915_miptree_layout(pipe, tex))
diff --git a/src/gallium/drivers/i965simple/brw_state.c b/src/gallium/drivers/i965simple/brw_state.c
index 2fc048bde00..7466fdc403d 100644
--- a/src/gallium/drivers/i965simple/brw_state.c
+++ b/src/gallium/drivers/i965simple/brw_state.c
@@ -328,8 +328,7 @@ static void brw_set_sampler_texture(struct pipe_context *pipe,
{
struct brw_context *brw = brw_context(pipe);
- pipe_texture_reference(pipe,
- (struct pipe_texture **) &brw->attribs.Texture[unit],
+ pipe_texture_reference((struct pipe_texture **) &brw->attribs.Texture[unit],
texture);
brw->state.dirty.brw |= BRW_NEW_TEXTURE;
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c
index 18669a1c6ef..1d6dd17d1d9 100644
--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -83,7 +83,7 @@ softpipe_set_sampler_texture(struct pipe_context *pipe,
draw_flush(softpipe->draw);
assert(unit < PIPE_MAX_SAMPLERS);
- pipe_texture_reference(pipe, &softpipe->texture[unit], texture);
+ pipe_texture_reference(&softpipe->texture[unit], texture);
sp_tile_cache_set_texture(pipe, softpipe->tex_cache[unit], texture);
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index 6ba0f09e0a1..a96447fa7a1 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -90,6 +90,7 @@ softpipe_texture_create(struct pipe_context *pipe,
spt->base = *templat;
spt->base.refcount = 1;
+ spt->base.pipe = pipe;
softpipe_texture_layout(spt);
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index da30dd6c484..0ff93c55277 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -220,7 +220,7 @@ sp_tile_cache_set_texture(struct pipe_context *pipe,
assert(!tc->surface);
- pipe_texture_reference(pipe, &tc->texture, texture);
+ pipe_texture_reference(&tc->texture, texture);
if (tc->tex_surf_map) {
pipe_surface_unmap(tc->tex_surf);