OSDN Git Service

i965: Fix hiz resolves getting stomped by depth offset validation.
authorEric Anholt <eric@anholt.net>
Tue, 18 Dec 2012 22:25:42 +0000 (14:25 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 22 Dec 2012 21:41:22 +0000 (13:41 -0800)
Fixes all the remaining non-Z32F_S8 depthstencil-render-miplevels tests
in piglit.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_draw.c

index cb8e682..faa29d1 100644 (file)
@@ -436,17 +436,17 @@ static bool brw_try_draw_prims( struct gl_context *ctx,
 
    intel_prepare_render(intel);
 
+   /* This workaround has to happen outside of brw_state_upload() because it
+    * may flush the batchbuffer for a blit, affecting the state flags.
+    */
+   brw_workaround_depthstencil_alignment(brw);
+
    /* 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);
 
-   /* This workaround has to happen outside of brw_state_upload() because it
-    * may flush the batchbuffer for a blit, affecting the state flags.
-    */
-   brw_workaround_depthstencil_alignment(brw);
-
    /* Bind all inputs, derive varying and size information:
     */
    brw_merge_inputs( brw, arrays );