This provides better information about which images in texture object have changed.
Also, call texture_update() from more places previously missed.
/* unmap */
pipe_surface_unmap(surface);
pipe_surface_reference(&surface, NULL);
+ pipe->texture_update(pipe, aaline->texture, 0, (1 << level));
}
}
/* unmap */
pipe_surface_unmap(surface);
pipe_surface_reference(&surface, NULL);
- pipe->texture_update(pipe, pstip->texture);
+ pipe->texture_update(pipe, pstip->texture, 0, 0x1);
}
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 */
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 ... */
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? */
}
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? */
}
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;
/**
* 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);
pt = st_get_stobj_texture(stObj);
pipe_texture_reference(&st->state.sampler_texture[unit], pt);
-
- if (stObj && stObj->dirtyData) {
- st->pipe->texture_update(st->pipe, pt);
- stObj->dirtyData = GL_FALSE;
- }
}
st->pipe->set_sampler_textures(st->pipe, st->state.num_textures,
/* unmap */
pipe_surface_unmap(surface);
pipe_surface_reference(&surface, NULL);
+ pipe->texture_update(pipe, pt, 0, 0x1);
+
assert(success);
/* restore */
/* Release surface */
pipe_surface_unmap(surface);
pipe_surface_reference(&surface, NULL);
+ pipe->texture_update(pipe, pt, 0, 0x1);
pt->format = format;
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;
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);
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;
texImage->Data = NULL;
}
- /* flag data as dirty */
- stObj->dirtyData = GL_TRUE;
+ pipe->texture_update(pipe, stObj->pt, stImage->face, (1 << level));
}
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);
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));
}
}
}
GLboolean imageOverride;
GLint depthOverride;
GLuint pitchOverride;
-
- GLboolean dirtyData;
};