summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-02-08 18:00:31 +0200
committerTopi Pohjolainen <[email protected]>2016-05-12 19:49:37 +0300
commit683dda00830b6c5f450d4ccbc95b108fe3f091b0 (patch)
tree39083a2513434e8bc81c8e62c48bf1f2f78fc3df /src/mesa
parent1a05aeeb1c83057041d558a8dca75ace8687fc96 (diff)
i965/gen9: Setup MCS for compressed texture surfaces
Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_surface_state.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index 4b9896fe7d6..b8462844ae6 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -249,11 +249,12 @@ gen8_emit_texture_surface_state(struct brw_context *brw,
pitch = mt->pitch;
}
- /* 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.
+ /* Prior to Gen9, 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. On Gen9 it will be uploaded when
+ * the surface is losslessly compressed (CCS_E).
*/
- if (mt->num_samples <= 1) {
+ if (mt->num_samples <= 1 && aux_mode != GEN9_SURFACE_AUX_MODE_CCS_E) {
aux_mt = NULL;
aux_mode = GEN8_SURFACE_AUX_MODE_NONE;
}