[Mesa-dev] [PATCH 1/3] i965: Move hiz resolve to after renderbuffer resizing
Chad Versace
chad.versace at linux.intel.com
Tue Aug 14 16:58:20 PDT 2012
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.
CC: Stephane Marchesin <marcheu at chromium.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52252
Reported-by: Lu Hua <huax.lu at intel.com>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
src/mesa/drivers/dri/i965/brw_draw.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index ccfc306..0b1a4e0 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -433,11 +433,6 @@ 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.
- */
- brw_predraw_resolve_buffers(brw);
-
/* Bind all inputs, derive varying and size information:
*/
brw_merge_inputs( brw, arrays );
@@ -458,6 +453,11 @@ static bool brw_try_draw_prims( struct gl_context *ctx,
intel_prepare_render(intel);
+ /* Resolves must occur after updating state, resizing renderbuffers,
+ * and finalizing textures.
+ */
+ brw_predraw_resolve_buffers(brw);
+
for (i = 0; i < nr_prims; i++) {
int estimated_max_prim_size;
--
1.7.11.4
More information about the mesa-dev
mailing list