summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c3
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 8a6ee708ccf..3e8cb3f5f0a 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -212,6 +212,9 @@ brw_depthbuffer_format(struct brw_context *brw)
drb = srb;
}
+ if (!drb)
+ return BRW_DEPTHFORMAT_D32_FLOAT;
+
switch (drb->Base.Format) {
case MESA_FORMAT_Z16:
return BRW_DEPTHFORMAT_D16_UNORM;