From: Kenneth Graunke Date: Tue, 20 Dec 2011 23:26:21 +0000 (-0800) Subject: i965: Don't use BRW_DEPTHFORMAT_D24_UNORM_X8_UINT on Gen4. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9df8662e28ff6b60e5296dc4583372e0771a3263;p=mesa.git 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 Reviewed-by: Chad Versace Reviewed-by: Eric Anholt --- 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: