[Mesa-dev] [PATCH 1/2] intel/isl: Add support for enabling clear color conversion

Topi Pohjolainen topi.pohjolainen at gmail.com
Tue Apr 3 15:15:32 UTC 2018


CC: Rafael Antognolli <rafael.antognolli at intel.com>
CC: Jordan Justen <jordan.l.justen at intel.com>
CC: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/intel/isl/isl.h               |  6 ++++++
 src/intel/isl/isl_surface_state.c | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index d65c621..ee89e07 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -1316,6 +1316,12 @@ struct isl_surf_fill_state_info {
    uint64_t clear_address;
 
    /**
+    * On gen11+, tells if the hardware should write the given clear color out
+    * for sampler and display engine in native format.
+    */
+   bool clear_color_conversion_enable;
+
+   /**
     * Surface write disables for gen4-5
     */
    isl_channel_mask_t write_disables;
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 77931f2..83bbbba 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -637,6 +637,17 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
 #endif
 
    if (info->aux_usage != ISL_AUX_USAGE_NONE) {
+#if GEN_GEN >= 11
+      /* From the Ice Lake BSpec, RENDER_SURFACE_STATE:
+       *
+       *  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.
+       */
+      s.ClearColorConversionEnable = info->clear_color_conversion_enable;
+#else
+      assert(!info->clear_color_conversion_enable);
+#endif
 #if GEN_GEN >= 10
       s.ClearValueAddressEnable = true;
       s.ClearValueAddress = info->clear_address;
-- 
2.7.4



More information about the mesa-dev mailing list