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 <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
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: