[Mesa-dev] [RFC 3/3] i965: emit_depthbuffer: fix segfault, rhbz#735794

Alon Levy alevy at redhat.com
Mon Sep 5 12:37:50 PDT 2011


Signed-off-by: Alon Levy <alevy at redhat.com>
---
 src/mesa/drivers/dri/i965/brw_misc_state.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 479cf82..f102bc6 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -248,6 +248,9 @@ static void emit_depthbuffer(struct brw_context *brw)
    else
       len = 5;
 
+   if (depth_irb && depth_irb->region == NULL)
+      depth_irb = NULL;
+
    if (!depth_irb && !stencil_irb) {
       BEGIN_BATCH(len);
       OUT_BATCH(_3DSTATE_DEPTH_BUFFER << 16 | (len - 2));
-- 
1.7.6.1



More information about the mesa-dev mailing list