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.
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 =