Mesa (fast-color-clear): isl: Set ClearColorConversionEnable.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 29 20:01:44 UTC 2019


Module: Mesa
Branch: fast-color-clear
Commit: a8e122d704ae72fec3cbe1e571849e67f03908b5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8e122d704ae72fec3cbe1e571849e67f03908b5

Author: Plamena Manolova <plamena.manolova at intel.com>
Date:   Thu Mar 14 22:28:20 2019 +0200

isl: Set ClearColorConversionEnable.

The ClearColorConversionEnable bit needs to be set
for GEN11 when inderect clear colors are used.

Signed-off-by: Plamena Manolova <plamena.n.manolova at gmail.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli at intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>

---

 src/intel/isl/isl_surface_state.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index cf31b36ccbe..4887dedc364 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -618,6 +618,27 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
          unreachable("Gen9 and earlier do not support indirect clear colors");
 #endif
       }
+
+#if GEN_GEN == 11
+      /*
+       * From BXML > GT > Shared Functions > vol5c Shared Functions >
+       * [Structure] RENDER_SURFACE_STATE [BDW+] > ClearColorConversionEnable:
+       *
+       *   Project: Gen11
+       *
+       *   "Enables Pixel backend hw to convert clear values into native format
+       *    and write back to clear address, so that display and sampler can use
+       *    the converted value for resolving fast cleared RTs."
+       *
+       * Summary:
+       *   Clear color conversion must be enabled if the clear color is stored
+       *   indirectly and fast color clears are enabled.
+       */
+      if (info->use_clear_address) {
+         s.ClearColorConversionEnable = true;
+      }
+#endif
+
 #if GEN_GEN >= 9
       if (!info->use_clear_address) {
          s.RedClearColor = info->clear_color.u32[0];




More information about the mesa-commit mailing list