summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2012-08-14 11:23:21 -0700
committerChad Versace <[email protected]>2012-08-27 07:48:28 -0700
commit88edbdf9f0c79e05593a71929f791fa4efb08ffb (patch)
treea59f526cb33226db9bc5e1b30fea20e814f82dee /src/mesa/drivers/dri
parenta2a7e640a4e81c906e42a98602c84757c37ed0b1 (diff)
i965: Move hiz resolve to after renderbuffer resizing (v2)
Do all pre-draw hiz resolves *after* the renderbuffers are resized by intel_prepare_render. Otherwise, we may resolve buffers that are immediately discarded afterwards. Fixes the assertion failure below when resizing windows in KDE and under some unknown circumstance in Chrome OS: intel_resolve_map.c:46: intel_resolve_map_set: Assertion `(*tail)->need == need' failed. Also, remove the comment that "resolves must occur [...] before setting up any hardware state". That was true when resolves were implemented with meta-ops, but no longer with blorp. v2: - Keep brw_predraw_resolve_buffers in its current position, which is before any brw_context bits are modified. Instead, move the call to intel_prepare_render. Note: This is a candiate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52252 Reported-by: Lu Hua <[email protected]> Reviewed-by: Paul Berry <[email protected]> Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 7ae3f6fc28a..b335e9616f6 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -432,8 +432,11 @@ static bool brw_try_draw_prims( struct gl_context *ctx,
*/
brw_validate_textures( brw );
- /* Resolves must occur after updating state and finalizing textures but
- * before setting up any hardware state for this draw call.
+ intel_prepare_render(intel);
+
+ /* Resolves must occur after updating renderbuffers, updating context state,
+ * and finalizing textures but before setting up any hardware state for
+ * this draw call.
*/
brw_predraw_resolve_buffers(brw);
@@ -455,8 +458,6 @@ static bool brw_try_draw_prims( struct gl_context *ctx,
* so can't access it earlier.
*/
- intel_prepare_render(intel);
-
for (i = 0; i < nr_prims; i++) {
int estimated_max_prim_size;