diff options
author | Kenneth Graunke <[email protected]> | 2011-12-07 02:21:37 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-12-07 14:51:12 -0800 |
commit | d464a21e2d796e396e7e4c0cfe971b41003e2d2a (patch) | |
tree | 19c646831aaf8d6c34ebe499b507436f135ee13f /src/mesa | |
parent | 5b27e44652119fd01fe93759e2c82348f4b6d707 (diff) |
i965: Return BRW_DEPTHBUFFER_D32_FLOAT as the null-depthbuffer format.
Fixes many crashes on Ivybridge due to upload_sf_state calling
brw_depthbuffer_format without an actual depth buffer. This was a
recent regression on master.
+3992 piglits on Ivybridge.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | 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 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; |