summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorAndre Maasikas <[email protected]>2010-01-22 12:57:01 +0200
committerAndre Maasikas <[email protected]>2010-01-22 12:58:27 +0200
commit278ad74fe060ab8ba21d21b675a40f6758edaeca (patch)
tree9989214bde255dff2d0101437c7c12338716e3d7 /src/mesa/drivers
parent7c6f51cdccdd0ed6370ce86ba21549991f4f4293 (diff)
radeon/fbo: flush rendering before generating mipmaps
or maybe should flush(also) in finish_render_texture...
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 20a27ad9a70..4538e74eea1 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -233,8 +233,15 @@ static void radeon_generate_mipmap(GLcontext *ctx, GLenum target,
void radeonGenerateMipmap(GLcontext* ctx, GLenum target, struct gl_texture_object *texObj)
{
+ radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
+ struct radeon_bo *bo;
GLuint face = _mesa_tex_target_to_face(target);
radeon_texture_image *baseimage = get_radeon_texture_image(texObj->Image[face][texObj->BaseLevel]);
+ bo = !baseimage->mt ? baseimage->bo : baseimage->mt->bo;
+
+ if (bo && radeon_bo_is_referenced_by_cs(bo, rmesa->cmdbuf.cs)) {
+ radeon_firevertices(rmesa);
+ }
radeon_teximage_map(baseimage, GL_FALSE);
radeon_generate_mipmap(ctx, target, texObj);