summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-03-19 17:08:16 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-03-19 17:15:14 -0600
commit4984487bc3338fc351a0631eaa4515e4adbb86a9 (patch)
tree38ff9c2b2bac8cee6c6fc992c4be7fbe18d0b91e /src/gallium
parent11c34dc644fe58b8178ab9142929a6685e3c0848 (diff)
gallium: add face, dirtyLevels params to pipe->texture_update()
This provides better information about which images in texture object have changed. Also, call texture_update() from more places previously missed.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/draw/draw_aaline.c1
-rw-r--r--src/gallium/auxiliary/draw/draw_pstipple.c2
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c3
-rw-r--r--src/gallium/drivers/cell/ppu/cell_texture.c3
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c3
-rw-r--r--src/gallium/drivers/i965simple/brw_tex_layout.c3
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c3
-rw-r--r--src/gallium/include/pipe/p_context.h6
8 files changed, 14 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/draw/draw_aaline.c b/src/gallium/auxiliary/draw/draw_aaline.c
index f2b983374e..b4fa6bd967 100644
--- a/src/gallium/auxiliary/draw/draw_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_aaline.c
@@ -410,6 +410,7 @@ aaline_create_texture(struct aaline_stage *aaline)
/* unmap */
pipe_surface_unmap(surface);
pipe_surface_reference(&surface, NULL);
+ pipe->texture_update(pipe, aaline->texture, 0, (1 << level));
}
}
diff --git a/src/gallium/auxiliary/draw/draw_pstipple.c b/src/gallium/auxiliary/draw/draw_pstipple.c
index 09d542002f..9d154a6838 100644
--- a/src/gallium/auxiliary/draw/draw_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pstipple.c
@@ -374,7 +374,7 @@ pstip_update_texture(struct pstip_stage *pstip)
/* unmap */
pipe_surface_unmap(surface);
pipe_surface_reference(&surface, NULL);
- pipe->texture_update(pipe, pstip->texture);
+ pipe->texture_update(pipe, pstip->texture, 0, 0x1);
}
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 27141c4d13..028b180a77 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -872,7 +872,8 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
pipe->flush(pipe, PIPE_FLUSH_WAIT);
- /*pipe->texture_update(pipe, pt); not really needed */
+ /* need to signal that the texture has changed _after_ rendering to it */
+ pipe->texture_update(pipe, pt, face, (1 << dstLevel));
}
/* restore state we changed */
diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c
index e235421107..9c694e136d 100644
--- a/src/gallium/drivers/cell/ppu/cell_texture.c
+++ b/src/gallium/drivers/cell/ppu/cell_texture.c
@@ -134,7 +134,8 @@ cell_texture_release_screen(struct pipe_screen *screen,
static void
-cell_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
+cell_texture_update(struct pipe_context *pipe, struct pipe_texture *texture,
+ uint face, uint levelsMask)
{
/* XXX TO DO: re-tile the texture data ... */
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index ef5adff550..c39e747705 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -542,7 +542,8 @@ i915_texture_release_screen(struct pipe_screen *screen,
static void
-i915_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
+i915_texture_update(struct pipe_context *pipe, struct pipe_texture *texture,
+ uint face, uint levelsMask)
{
/* no-op? */
}
diff --git a/src/gallium/drivers/i965simple/brw_tex_layout.c b/src/gallium/drivers/i965simple/brw_tex_layout.c
index b24ac87c37..b580f98204 100644
--- a/src/gallium/drivers/i965simple/brw_tex_layout.c
+++ b/src/gallium/drivers/i965simple/brw_tex_layout.c
@@ -358,7 +358,8 @@ brw_texture_release_screen(struct pipe_screen *screen,
static void
-brw_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
+brw_texture_update(struct pipe_context *pipe, struct pipe_texture *texture,
+ uint face, uint levelsMask)
{
/* no-op? */
}
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index 64bf353aa4..a98b3b1a4a 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -174,7 +174,8 @@ softpipe_get_tex_surface_screen(struct pipe_screen *screen,
static void
softpipe_texture_update(struct pipe_context *pipe,
- struct pipe_texture *texture)
+ struct pipe_texture *texture,
+ uint face, uint levelsMask)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
uint unit;
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index b64948f0f3..a3824601be 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -192,12 +192,10 @@ struct pipe_context {
/**
* Called when texture data is changed.
- * Note: we could pass some hints about which mip levels or cube faces
- * have changed...
- * XXX this may go away - could pass a 'write' flag to get_tex_surface()
*/
void (*texture_update)(struct pipe_context *pipe,
- struct pipe_texture *texture);
+ struct pipe_texture *texture,
+ uint face, uint dirtyLevelsMask);