[Mesa-dev] [PATCH] i965: Don't use BRW_DEPTHFORMAT_D24_UNORM_X8_UINT on Gen4.

Chad Versace chad.versace at linux.intel.com
Wed Dec 21 17:00:01 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/21/2011 04:36 PM, Kenneth Graunke wrote:
> 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 at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_misc_state.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> v2: Add an explicit else clause and return rather than fallthrough.
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
> index e76901a..cac8a93 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:


Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

- ----
Chad Versace
chad.versace at linux.intel.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJO8oEPAAoJEAIvNt057x8iMYAP/1KfDK3cK0Bhf7emAD4zrUMf
nQ9YQiLuZfVBA5olEZ2PSrXIHzl5zZOuKZd45vjAhovPSDPPtuW8/0lco7BYgesM
9HlUCiLbZBGP+5m/aPNfXbCAukTRHojCEzRvWIA3aOtkWKMweucxvqVwkIkgkhb+
HHNxpCGHOVgxuzyEQM5Zvka0ZN3PtOR66W04mPirQ25GkbBG4k135XfWnxd0jRtD
j5PyfTb59vUHMyHMaAOCYpQwV+cE4mmi3T/RA7KXF5xe4o+p83z3CuqqsBU5IFU8
bCc904H+kT5zkJsqP6fhDLL1m+2yzr1kPfzzKWcjaNcQFQ6vkYalUG+0ihkGVQci
6rOn0DOlrB8N7Hw3vLL0oVxuKt9KykyAl4DzIvawHLqOusCQ2yhbHeiNTdZm7RjD
v5mCqaFbhtGRPqxDspImyaK5p30alT42pcKdslivRNKbg7+WZM3RByS3jSbVd5kd
R08impJvxxdYCrATZ/EFgv+jsPo7x9qnFmA9TLeOj4F8SeFEkOukUextAeZE2cno
CyB5lLtKro5JjfMeT5O6qjPLda40IOfgxCbSYrMZr+kikbP3D0BiXdKpB28NG2ir
7kjKOgbVy6bVfJ8VTJzfp38WWU1kse3HJmv9LnsaBCPg6eFD+BntW2CrOgNiKaqf
cA9OyiLYkC4GugJVopaw
=tHHr
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list