Mesa (intel-2008-q3): i965: don' t emit state when dri_bufmgr_check_aperture_space fails.
Haihao Xiang
haihao at kemper.freedesktop.org
Fri Oct 24 08:40:53 UTC 2008
Module: Mesa
Branch: intel-2008-q3
Commit: 1bf94d419805538ac23a4d0b04d31ac5e4487aca
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1bf94d419805538ac23a4d0b04d31ac5e4487aca
Author: Xiang, Haihao <haihao.xiang at intel.com>
Date: Fri Oct 24 16:05:48 2008 +0800
i965: don't emit state when dri_bufmgr_check_aperture_space fails.
This ensures there is an unfilled batchbuffer used for emitting states again. Partial fix for #17964.
(cherry picked from commit ec8076264ea2390d4cb749be5c88bbf2bf5d4847)
---
src/mesa/drivers/dri/i965/brw_curbe.c | 4 +++-
src/mesa/drivers/dri/i965/brw_misc_state.c | 12 +++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 0de23a9..b9c929b 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -333,8 +333,10 @@ static void emit_constant_buffer(struct brw_context *brw)
brw->curbe.curbe_bo,
};
- if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array)))
+ if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array))) {
intel_batchbuffer_flush(intel->batch);
+ return;
+ }
BEGIN_BATCH(2, IGNORE_CLIPRECTS);
if (sz == 0) {
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 487c638..afa8694 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -86,8 +86,10 @@ static void upload_binding_table_pointers(struct brw_context *brw)
brw->wm.bind_bo,
};
- if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array)))
+ if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array))) {
intel_batchbuffer_flush(intel->batch);
+ return;
+ }
BEGIN_BATCH(6, IGNORE_CLIPRECTS);
OUT_BATCH(CMD_BINDING_TABLE_PTRS << 16 | (6 - 2));
@@ -152,8 +154,10 @@ static void upload_psp_urb_cbs(struct brw_context *brw )
brw->cc.state_bo,
};
- if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array)))
+ if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array))) {
intel_batchbuffer_flush(intel->batch);
+ return;
+ }
upload_pipelined_state_pointers(brw);
brw_upload_urb_fence(brw);
@@ -216,8 +220,10 @@ static void emit_depthbuffer(struct brw_context *brw)
return;
}
- if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array)))
+ if (dri_bufmgr_check_aperture_space(aper_array, ARRAY_SIZE(aper_array))) {
intel_batchbuffer_flush(intel->batch);
+ return;
+ }
BEGIN_BATCH(len, IGNORE_CLIPRECTS);
OUT_BATCH(CMD_DEPTH_BUFFER << 16 | (len - 2));
More information about the mesa-commit
mailing list