From: Eric Anholt Date: Thu, 16 Nov 2017 20:01:13 +0000 (-0800) Subject: broadcom/vc5: Return the depth in all components of depth textures. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81cdfdd670757638f29cea2d80b143021d13f5a3;p=mesa.git broadcom/vc5: Return the depth in all components of depth textures. Apparently gallium's u_blitter wants depth from at least the .z component, and other swizzling appears to apply on top of that. Fixes fbo-generatemipmap-formats failures with depth formats. --- diff --git a/src/gallium/drivers/vc5/vc5_formats.c b/src/gallium/drivers/vc5/vc5_formats.c index 0c6b6fa3157..c9a8f19cf4f 100644 --- a/src/gallium/drivers/vc5/vc5_formats.c +++ b/src/gallium/drivers/vc5/vc5_formats.c @@ -182,14 +182,14 @@ static const struct vc5_format vc5_format_table[] = { FORMAT(R11G11B10_FLOAT, R11F_G11F_B10F, R11F_G11F_B10F, SWIZ_XYZW, 16, 0), FORMAT(R9G9B9E5_FLOAT, NO, RGB9_E5, SWIZ_XYZW, 16, 0), - FORMAT(S8_UINT_Z24_UNORM, DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_X001, 32, 1), - FORMAT(X8Z24_UNORM, DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_X001, 32, 1), - FORMAT(S8X24_UINT, NO, R32F, SWIZ_X001, 32, 1), - FORMAT(Z32_FLOAT, DEPTH_COMPONENT32F, R32F, SWIZ_X001, 32, 1), - FORMAT(Z16_UNORM, DEPTH_COMPONENT16, DEPTH_COMP16, SWIZ_X001, 32, 1), + FORMAT(S8_UINT_Z24_UNORM, DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_XXXX, 32, 1), + FORMAT(X8Z24_UNORM, DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_XXXX, 32, 1), + FORMAT(S8X24_UINT, NO, R32F, SWIZ_XXXX, 32, 1), + FORMAT(Z32_FLOAT, DEPTH_COMPONENT32F, R32F, SWIZ_XXXX, 32, 1), + FORMAT(Z16_UNORM, DEPTH_COMPONENT16, DEPTH_COMP16, SWIZ_XXXX, 32, 1), /* Pretend we support this, but it'll be separate Z32F depth and S8. */ - FORMAT(Z32_FLOAT_S8X24_UINT, DEPTH_COMPONENT32F, R32F, SWIZ_X001, 32, 1), + FORMAT(Z32_FLOAT_S8X24_UINT, DEPTH_COMPONENT32F, R32F, SWIZ_XXXX, 32, 1), FORMAT(ETC2_RGB8, NO, RGB8_ETC2, SWIZ_XYZ1, 16, 0), FORMAT(ETC2_SRGB8, NO, RGB8_ETC2, SWIZ_XYZ1, 16, 0),