Module: Mesa Branch: master Commit: 7553cbfc9d78f0a4f8816122ce6327bc3899c2b5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7553cbfc9d78f0a4f8816122ce6327bc3899c2b5
Author: Eric Anholt <e...@anholt.net> Date: Fri Mar 30 16:14:29 2018 -0700 broadcom/vc5: Fix MSAA depth/stencil size setup. The v3dX(get_internal_type_bpp_for_output_format)() call only handles color output formats (which overlap in enum numbers with depth output formats), so for depth we just need to take the normal cpp times the number of samples. --- src/gallium/drivers/vc5/vc5_resource.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c index 321a14b904..c8c99cf487 100644 --- a/src/gallium/drivers/vc5/vc5_resource.c +++ b/src/gallium/drivers/vc5/vc5_resource.c @@ -565,8 +565,10 @@ vc5_resource_setup(struct pipe_screen *pscreen, pipe_reference_init(&prsc->reference, 1); prsc->screen = pscreen; - if (prsc->nr_samples <= 1) { - rsc->cpp = util_format_get_blocksize(prsc->format); + if (prsc->nr_samples <= 1 || + util_format_is_depth_or_stencil(prsc->format)) { + rsc->cpp = util_format_get_blocksize(prsc->format) * + MAX2(prsc->nr_samples, 1); } else { assert(vc5_rt_format_supported(&screen->devinfo, prsc->format)); uint32_t output_image_format = _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit