summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2008-02-01 16:46:41 +0800
committerXiang, Haihao <[email protected]>2008-02-01 16:48:16 +0800
commit71f53a22d048b4d972c88a2ed49aa3bc4ff76a21 (patch)
tree3fa2d62084518c7052888843d53ce075bec19f73
parent3158e981f5f37768e9b04765704b9eaece8b899b (diff)
i965: Don't emit state if fall back to software rendering. fix #14116
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index d35f94e620d..73a6cee75ba 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -207,6 +207,8 @@ void brw_validate_state( struct brw_context *brw )
if (brw->state.dirty.brw & BRW_NEW_CONTEXT)
brw_clear_batch_cache_flush(brw);
+ brw->intel.Fallback = 0;
+
if (INTEL_DEBUG) {
/* Debug version which enforces various sanity checks on the
* state flags which are generated and checked to help ensure
@@ -225,6 +227,9 @@ void brw_validate_state( struct brw_context *brw )
atom->dirty.cache);
assert(atom->update);
+ if (brw->intel.Fallback)
+ break;
+
if (check_state(state, &atom->dirty)) {
atom->update( brw );
@@ -246,10 +251,14 @@ void brw_validate_state( struct brw_context *brw )
for (i = 0; i < Elements(atoms); i++) {
const struct brw_tracked_state *atom = brw->state.atoms[i];
- if (check_state(state, &atom->dirty))
+ if (brw->intel.Fallback)
+ break;
+
+ if (check_state(state, &atom->dirty))
atom->update( brw );
}
}
- memset(state, 0, sizeof(*state));
+ if (!brw->intel.Fallback)
+ memset(state, 0, sizeof(*state));
}