diff options
-rw-r--r-- | src/gallium/drivers/vc5/vc5_resource.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c index 321a14b9046..c8c99cf4870 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 = |