diff options
author | Paul Berry <[email protected]> | 2013-03-08 13:39:43 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-03-19 16:56:51 -0700 |
commit | 0af56c9d53a454477645f4537b8086120a638d3e (patch) | |
tree | a9cb0adae44e4b9d5e18d909e04dd36f8990152a /src/mesa/drivers/dri/intel/intel_tex_validate.c | |
parent | 49c1fc7044eaaa5c2dca05ff4a709be8e3636871 (diff) |
i965: Avoid unnecessary copy when depthstencil workaround invoked by clear.
Since apps typically begin rendering with a call to glClear(), it is
likely that when brw_workaround_depthstencil_alignment() moves a
miplevel to a temporary buffer, it can avoid doing a blit, since the
contents of the miplevel are about to be erased.
This patch adds the necessary plumbing to determine when
brw_workaround_depthstencil_alignment() is being called as a
consequence of glClear(), and avoids the unnecessary blit when it is
safe to do so.
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
v2: Eliminate unnecessary call to _mesa_is_depthstencil_format(). Fix
handling of depth buffer in depth/stencil format.
v3: Use correct bitfields for clear_mask. Fix handling of depth
buffer in depth/stencil format when hardware uses separate stencil.
When invalidating, make sure we still reassociate the image to the new
miptree.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_validate.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_validate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c index 654001d055d..c880bcee102 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c @@ -123,7 +123,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) break; if (intelObj->mt != intelImage->mt) { - intel_miptree_copy_teximage(intel, intelImage, intelObj->mt); + intel_miptree_copy_teximage(intel, intelImage, intelObj->mt, + false /* invalidate */); } /* After we're done, we'd better agree that our layout is |