From: Eric Anholt Date: Tue, 24 Apr 2018 20:22:41 +0000 (-0700) Subject: broadcom/vc5: Fix tile load/store of MSAA surfaces on 4.x. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5710532e9e5b44e40c5ed65b2dcffe66f6803d01;p=mesa.git 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. --- diff --git a/src/broadcom/cle/v3d_packet_v41.xml b/src/broadcom/cle/v3d_packet_v41.xml index 32934d71cda..5f6d643195a 100644 --- a/src/broadcom/cle/v3d_packet_v41.xml +++ b/src/broadcom/cle/v3d_packet_v41.xml @@ -277,7 +277,7 @@ - + @@ -311,7 +311,7 @@ - + diff --git a/src/broadcom/cle/v3d_packet_v42.xml b/src/broadcom/cle/v3d_packet_v42.xml index db128b54518..f180e5eec5e 100644 --- a/src/broadcom/cle/v3d_packet_v42.xml +++ b/src/broadcom/cle/v3d_packet_v42.xml @@ -278,7 +278,7 @@ - + @@ -312,7 +312,7 @@ - + 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.