diff options
author | Eric Anholt <[email protected]> | 2018-04-24 14:56:23 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-04-25 09:21:54 -0700 |
commit | 9f3f4284c0397615bfe50ba4e50aaffe5dc64e84 (patch) | |
tree | 823243718e4e5422189281e8feb75e7ced31ca2b | |
parent | ac207acb97cdfa203c686806ba3a41269e1bf35d (diff) |
broadcom/vc5: Fix cpp of MSAA surfaces on 4.x.
The internal-type-bpp path is for surfaces that get stored in the raw TLB
format. For 4.x, we're storing MSAA as just 2x width/height at the
original format.
-rw-r--r-- | src/gallium/drivers/vc5/vc5_resource.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/vc5/vc5_state.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c index eb5fa4e908d..3c2ed270770 100644 --- a/src/gallium/drivers/vc5/vc5_resource.c +++ b/src/gallium/drivers/vc5/vc5_resource.c @@ -566,9 +566,11 @@ vc5_resource_setup(struct pipe_screen *pscreen, prsc->screen = pscreen; if (prsc->nr_samples <= 1 || + screen->devinfo.ver >= 40 || util_format_is_depth_or_stencil(prsc->format)) { - rsc->cpp = util_format_get_blocksize(prsc->format) * - MAX2(prsc->nr_samples, 1); + rsc->cpp = util_format_get_blocksize(prsc->format); + if (screen->devinfo.ver < 40 && prsc->nr_samples > 1) + rsc->cpp *= prsc->nr_samples; } else { assert(vc5_rt_format_supported(&screen->devinfo, prsc->format)); uint32_t output_image_format = diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c index 350bd6a4ed3..42ae64157c4 100644 --- a/src/gallium/drivers/vc5/vc5_state.c +++ b/src/gallium/drivers/vc5/vc5_state.c @@ -752,7 +752,7 @@ vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, #endif tex.array_stride_64_byte_aligned = rsc->cube_map_stride / 64; - if (prsc->nr_samples > 1) { + if (prsc->nr_samples > 1 && V3D_VERSION < 40) { /* Using texture views to reinterpret formats on our * MSAA textures won't work, because we don't lay out * the bits in memory as it's expected -- for example, |