Mesa (master): i965: Fix BRW_BATCH_STRUCT to specify RENDER_RING, not UNKNOWN_RING.
Kenneth Graunke
kwg at kemper.freedesktop.org
Wed Dec 4 00:58:56 UTC 2013
Module: Mesa
Branch: master
Commit: 26b7b50afeea8ff252501b9c9b10385960b236f0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=26b7b50afeea8ff252501b9c9b10385960b236f0
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Nov 26 16:32:15 2013 -0800
i965: Fix BRW_BATCH_STRUCT to specify RENDER_RING, not UNKNOWN_RING.
I missed this in the boolean -> enum conversion. C cheerfully casts
false -> 0 -> UNKNOWN_RING. On Gen4-5, this causes the render ring
prelude hook to get called in the middle of the batch, which is crazy.
BRW_BATCH_STRUCT is not used on Gen6+.
Fixes regressions since 395a32717df494353703f3581edcd3ba380f16d6
("i965: Introduce an UNKNOWN_RING state.").
Fixes "fips -v glxgears" on Ironlake.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/mesa/drivers/dri/i965/brw_state.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 2a4b23c..3f7831c 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -173,8 +173,8 @@ void brw_destroy_caches( struct brw_context *brw );
/***********************************************************************
* brw_state_batch.c
*/
-#define BRW_BATCH_STRUCT(brw, s) intel_batchbuffer_data(brw, (s), \
- sizeof(*(s)), false)
+#define BRW_BATCH_STRUCT(brw, s) \
+ intel_batchbuffer_data(brw, (s), sizeof(*(s)), RENDER_RING)
void *brw_state_batch(struct brw_context *brw,
enum state_struct_type type,
More information about the mesa-commit
mailing list