summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_draw.c
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-05-07 14:55:42 -0700
committerPaul Berry <stereotype441@gmail.com>2013-06-12 11:10:07 -0700
commit67cd0f97030a358777c01ee6ad79926717dfdf42 (patch)
treef2c142608a6da3c79db7d3b5ba89de86f7d1b87a /src/mesa/drivers/dri/i965/brw_draw.c
parente9dfcb38e97ac05023759b749fb6f8f56ab28f57 (diff)
downloadexternal_mesa3d-67cd0f97030a358777c01ee6ad79926717dfdf42.zip
external_mesa3d-67cd0f97030a358777c01ee6ad79926717dfdf42.tar.gz
external_mesa3d-67cd0f97030a358777c01ee6ad79926717dfdf42.tar.bz2
i965/gen7+: Resolve color buffers when necessary.
Resolve color buffers that have been fast-color cleared: 1. before texturing from the buffer (brw_predraw_resolve_buffers()) 2. before using the buffer as the source in a blorp blit (brw_blorp_blit_miptrees()) 3. before mapping the buffer's miptree (intel_miptree_map_raw(), intel_texsubimage_tiled_memcpy()) 4. before accessing the buffer using the hardware blitter (intel_miptree_blit(), do_blit_bitmap()) v2: Rework based on the fact that we have decided not to use an accessor function to protect access to the region. Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 657d6ee..5730eed 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -41,6 +41,7 @@
#include "swrast_setup/swrast_setup.h"
#include "drivers/common/meta.h"
+#include "brw_blorp.h"
#include "brw_draw.h"
#include "brw_defines.h"
#include "brw_context.h"
@@ -310,7 +311,9 @@ brw_predraw_resolve_buffers(struct brw_context *brw)
if (depth_irb)
intel_renderbuffer_resolve_hiz(intel, depth_irb);
- /* Resolve depth buffer of each enabled depth texture. */
+ /* Resolve depth buffer of each enabled depth texture, and color buffer of
+ * each fast-clear-enabled color texture.
+ */
for (int i = 0; i < BRW_MAX_TEX_UNIT; i++) {
if (!ctx->Texture.Unit[i]._ReallyEnabled)
continue;
@@ -318,6 +321,7 @@ brw_predraw_resolve_buffers(struct brw_context *brw)
if (!tex_obj || !tex_obj->mt)
continue;
intel_miptree_all_slices_resolve_depth(intel, tex_obj->mt);
+ intel_miptree_resolve_color(intel, tex_obj->mt);
}
}