summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-12-20 15:26:21 -0800
committerKenneth Graunke <[email protected]>2011-12-23 12:15:20 -0800
commit9df8662e28ff6b60e5296dc4583372e0771a3263 (patch)
tree06a262e13bf0fc6d38a6d40eb0097f19edcec593 /src/mesa
parentcb045880b113b0042d8dfb7e4cdf76e6cc76c1d1 (diff)
i965: Don't use BRW_DEPTHFORMAT_D24_UNORM_X8_UINT on Gen4.
X8 depth formats weren't supported until Ironlake (Gen 5). Fixes GPU hangs introduced in d84a180417d1eabd680554970f1eaaa93abcd41e. One example test case was "fbo-missing-attachment-blit from". Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 7b1398134bf..e2ac170d086 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -223,7 +223,10 @@ brw_depthbuffer_format(struct brw_context *brw)
case MESA_FORMAT_Z32_FLOAT:
return BRW_DEPTHFORMAT_D32_FLOAT;
case MESA_FORMAT_X8_Z24:
- return BRW_DEPTHFORMAT_D24_UNORM_X8_UINT;
+ if (intel->gen >= 5)
+ return BRW_DEPTHFORMAT_D24_UNORM_X8_UINT;
+ else /* Gen4 doesn't support X8; use S8 instead. */
+ return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
case MESA_FORMAT_S8_Z24:
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
case MESA_FORMAT_Z32_FLOAT_X24S8: