diff options
author | Eric Anholt <[email protected]> | 2018-04-24 13:22:41 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-04-25 09:21:54 -0700 |
commit | 5710532e9e5b44e40c5ed65b2dcffe66f6803d01 (patch) | |
tree | 3d027b42a9e6f0b826eb1686c8136d8de424f048 /src/gallium/drivers/vc5/vc5_rcl.c | |
parent | 413c5ca3727898fdb4fa1d2849d0c2defdd77b48 (diff) |
broadcom/vc5: Fix tile load/store of MSAA surfaces on 4.x.
For single-sample we have to always program SAMPLE_0, but for multisample
we want to store all the samples.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_rcl.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_rcl.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c index 2b1309bc1a9..32892275130 100644 --- a/src/gallium/drivers/vc5/vc5_rcl.c +++ b/src/gallium/drivers/vc5/vc5_rcl.c @@ -85,7 +85,11 @@ load_general(struct vc5_cl *cl, struct pipe_surface *psurf, int buffer, load.height_in_ub_or_stride = slice->stride; } - /* XXX: MSAA */ + if (psurf->texture->nr_samples > 1) + load.decimate_mode = V3D_DECIMATE_MODE_ALL_SAMPLES; + else + load.decimate_mode = V3D_DECIMATE_MODE_SAMPLE_0; + #else /* V3D_VERSION < 40 */ /* Can't do raw ZSTENCIL loads -- need to load/store them to * separate buffers for Z and stencil. @@ -147,6 +151,12 @@ store_general(struct vc5_job *job, &rsc->slices[psurf->u.tex.level]; store.height_in_ub_or_stride = slice->stride; } + + if (psurf->texture->nr_samples > 1) + store.decimate_mode = V3D_DECIMATE_MODE_ALL_SAMPLES; + else + store.decimate_mode = V3D_DECIMATE_MODE_SAMPLE_0; + #else /* V3D_VERSION < 40 */ /* Can't do raw ZSTENCIL stores -- need to load/store them to * separate buffers for Z and stencil. |