xf86-video-intel: src/i965_render.c

Zhenyu Wang zhen at kemper.freedesktop.org
Sun Dec 28 21:24:29 PST 2008


 src/i965_render.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit cfaaf6af777ad8e56da5a077bdc01f4f2d7bc4d6
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Dec 29 21:17:44 2008 +0800

    Don't count vertex buffer in second aperture size check
    
    With batch flush notify vertex buffer will be unreferenced,
    so don't count it in later aperture check. Also adding
    uninitialized vertex buffer check in batch flush notify.

diff --git a/src/i965_render.c b/src/i965_render.c
index df3814f..3b0ee35 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1015,11 +1015,8 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
 	    /* If the command still won't fit in an empty batch, then it's
 	     * just plain too big for the hardware---fallback to software.
 	     */
-	    if (dri_bufmgr_check_aperture_space (bo_table, NUM_BO) < 0) {
-		dri_bo_unreference (render_state->vertex_buffer_bo);
-		render_state->vertex_buffer_bo = NULL;
+	    if (dri_bufmgr_check_aperture_space (bo_table, 1) < 0)
 		return FALSE;
-	    }
 	}
     }
 
@@ -1588,8 +1585,10 @@ i965_batch_flush_notify(ScrnInfoPtr pScrn)
     /* Once a batch is emitted, we never want to map again any buffer
      * object being referenced by that batch, (which would be very
      * expensive). */
-    dri_bo_unreference (render_state->vertex_buffer_bo);
-    render_state->vertex_buffer_bo = NULL;
+    if (render_state->vertex_buffer_bo) {
+	dri_bo_unreference (render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+    }
 }
 
 /**


More information about the xorg-commit mailing list