diff options
author | Eric Anholt <[email protected]> | 2009-12-09 11:36:45 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-12-10 14:47:09 -0800 |
commit | 539a14a1dd5a0d277b193d9cd2d06423ed98dc8a (patch) | |
tree | d62a5a66bd512830d95f69a0960f9da2f41fb049 /src/mesa/drivers/dri | |
parent | 967e6e20099ebd3a7f68f49233e6cf3c99ce3317 (diff) |
intel: Flush the render/texture cache when finishing render to texture.
Back when we were flushing the entire batch at BindFramebuffer, the kernel
would notice the domain transition when someone went to texture from it and
flush for us. We no longer do the batch flushing every time, so we get to
do aggressive flushing until we move batchbuffer handling to libdrm.
Fixes piglit fbo-flushing. Bug #25377. No noticeable performance loss
on cairo-gl (so this is better than batch flushing).
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 5615040946f..679fa2f82a2 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -37,6 +37,7 @@ #include "drivers/common/meta.h" #include "intel_context.h" +#include "intel_batchbuffer.h" #include "intel_buffers.h" #include "intel_fbo.h" #include "intel_mipmap_tree.h" @@ -591,6 +592,7 @@ static void intel_finish_render_texture(GLcontext * ctx, struct gl_renderbuffer_attachment *att) { + struct intel_context *intel = intel_context(ctx); struct gl_texture_object *tex_obj = att->Texture; struct gl_texture_image *image = tex_obj->Image[att->CubeMapFace][att->TextureLevel]; @@ -598,8 +600,14 @@ intel_finish_render_texture(GLcontext * ctx, /* Flag that this image may now be validated into the object's miptree. */ intel_image->used_as_render_target = GL_FALSE; -} + /* Since we've (probably) rendered to the texture and will (likely) use + * it in the texture domain later on in this batchbuffer, flush the + * batch. Once again, we wish for a domain tracker in libdrm to cover + * usage inside of a batchbuffer like GEM does in the kernel. + */ + intel_batchbuffer_emit_mi_flush(intel->batch); +} /** * Do additional "completeness" testing of a framebuffer object. |