[Mesa-dev] [v4 08/11] i965/gen9: Setup MCS for compressed texture surfaces

Ben Widawsky ben at bwidawsk.net
Mon May 9 17:45:00 UTC 2016


On Thu, Apr 21, 2016 at 02:59:03PM +0300, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>

> ---
>  src/mesa/drivers/dri/i965/gen8_surface_state.c | 9 +++++----
>  1 file 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 e3593d3..18e7c75 100644
> --- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
> @@ -250,11 +250,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;
>     }
> -- 
> 2.5.5
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list