summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_texture.c
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/mesa/state_tracker/st_cb_texture.c
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/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index d4731c7737..306b27c423 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -476,6 +476,7 @@ st_TexImage(GLcontext * ctx,
struct gl_texture_image *texImage,
GLsizei imageSize, int compressed)
{
+ struct pipe_context *pipe = ctx->st->pipe;
struct st_texture_object *stObj = st_texture_object(texObj);
struct st_texture_image *stImage = st_texture_image(texImage);
GLint postConvWidth, postConvHeight;
@@ -690,8 +691,8 @@ st_TexImage(GLcontext * ctx,
texImage->Data = NULL;
}
- /* flag data as dirty */
- stObj->dirtyData = GL_TRUE;
+ if (stObj->pt)
+ pipe->texture_update(pipe, stObj->pt, stImage->face, (1 << level));
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
ctx->Driver.GenerateMipmap(ctx, target, texObj);
@@ -866,6 +867,7 @@ st_TexSubimage(GLcontext * ctx,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
+ struct pipe_context *pipe = ctx->st->pipe;
struct st_texture_object *stObj = st_texture_object(texObj);
struct st_texture_image *stImage = st_texture_image(texImage);
GLuint dstRowStride;
@@ -924,8 +926,7 @@ st_TexSubimage(GLcontext * ctx,
texImage->Data = NULL;
}
- /* flag data as dirty */
- stObj->dirtyData = GL_TRUE;
+ pipe->texture_update(pipe, stObj->pt, stImage->face, (1 << level));
}
@@ -1179,8 +1180,7 @@ do_copy_texsubimage(GLcontext *ctx,
pipe_surface_reference(&dest_surface, NULL);
- /* flag data as dirty */
- stObj->dirtyData = GL_TRUE;
+ pipe->texture_update(pipe, stObj->pt, stImage->face, (1 << level));
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
ctx->Driver.GenerateMipmap(ctx, target, texObj);
@@ -1481,6 +1481,7 @@ st_finalize_texture(GLcontext *ctx,
if (stImage && stObj->pt != stImage->pt) {
copy_image_data_to_texture(ctx->st, stObj, level, stImage);
*needFlush = GL_TRUE;
+ pipe->texture_update(pipe, stObj->pt, face, (1 << level));
}
}
}