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 | |
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')
-rw-r--r-- | src/broadcom/cle/v3d_packet_v41.xml | 4 | ||||
-rw-r--r-- | src/broadcom/cle/v3d_packet_v42.xml | 4 | ||||
-rw-r--r-- | src/gallium/drivers/vc5/vc5_rcl.c | 12 |
3 files changed, 15 insertions, 5 deletions
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 @@ <field name="Clear buffer being stored" size="1" start="18" type="bool"/> <field name="Output Image Format" size="6" start="12" type="Output Image Format"/> - <field name="Decimate" size="2" start="10" type="Decimate Mode"/> + <field name="Decimate mode" size="2" start="10" type="Decimate Mode"/> <field name="A dithered" size="1" start="9" type="bool"/> <field name="BGR dithered" size="1" start="8" type="bool"/> @@ -311,7 +311,7 @@ <field name="Input Image Format" size="6" start="12" type="Output Image Format"/> - <field name="Decimate" size="2" start="10" type="Decimate Mode"/> + <field name="Decimate mode" size="2" start="10" type="Decimate Mode"/> <field name="Flip Y" size="1" start="7" type="bool"/> 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 @@ <field name="Clear buffer being stored" size="1" start="18" type="bool"/> <field name="Output Image Format" size="6" start="12" type="Output Image Format"/> - <field name="Decimate" size="2" start="10" type="Decimate Mode"/> + <field name="Decimate mode" size="2" start="10" type="Decimate Mode"/> <field name="A dithered" size="1" start="9" type="bool"/> <field name="BGR dithered" size="1" start="8" type="bool"/> @@ -312,7 +312,7 @@ <field name="Input Image Format" size="6" start="12" type="Output Image Format"/> - <field name="Decimate" size="2" start="10" type="Decimate Mode"/> + <field name="Decimate mode" size="2" start="10" type="Decimate Mode"/> <field name="Flip Y" size="1" start="7" type="bool"/> 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. |