summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2015-11-24 17:59:28 +0100
committerNeil Roberts <[email protected]>2015-12-11 18:05:56 +0000
commiteb291d7013eef64c33826f9cc0006c89adcf4e53 (patch)
treea18bd78e81d1d3cd9bb96e8522a8b6e2e7e453cf /src/mesa
parent44902ed1fa84525fbb959dc22357cb42214c185b (diff)
i965/gen8+: Don't upload the MCS buffer for single-sampled textures
For single-sampled textures the MCS buffer is only used to implement fast clears. However the surface always needs to be resolved before being used as a texture anyway so the the MCS buffer doesn't actually achieve anything. This is important for Gen9 because in that case SRGB surfaces are not supported for fast clears and we don't want the hardware to see the MCS buffer in that case. Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_surface_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index b062bf08aaf..904950dfa07 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -225,7 +225,11 @@ gen8_emit_texture_surface_state(struct brw_context *brw,
pitch = mt->pitch;
}
- if (mt->mcs_mt) {
+ /* The MCS is not uploaded for single-sampled surfaces because the color
+ * buffer should always have been resolved before it is used as a texture
+ * so there is no need for it.
+ */
+ if (mt->mcs_mt && mt->num_samples > 1) {
aux_mt = mt->mcs_mt;
aux_mode = GEN8_SURFACE_AUX_MODE_MCS;