From: Anuj Phogat Date: Thu, 27 Apr 2017 17:35:05 +0000 (-0700) Subject: i965/cnl: Don't resolve single sampled color rb in case of sRGB formats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b76659997ebb08e69430bfd5eafbe2af5d494a8f;p=mesa.git i965/cnl: Don't resolve single sampled color rb in case of sRGB formats As sRGB now supports lossless compression, we also need to stop resolving single sampled color render buffers for sRGB formats in Gen 10. Signed-off-by: Anuj Phogat Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 7b4cb12ac68..eda8a0afab5 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -2582,7 +2582,7 @@ intel_miptree_prepare_render(struct brw_context *brw, * enabled because otherwise the surface state will be programmed with * the linear equivalent format anyway. */ - if (brw->gen >= 9 && srgb_enabled && mt->num_samples <= 1 && + if (brw->gen == 9 && srgb_enabled && mt->num_samples <= 1 && _mesa_get_srgb_format_linear(mt->format) != mt->format) { /* Lossless compression is not supported for SRGB formats, it