[Mesa-dev] [PATCH v15 05/16] i965: add a no_aux field to identify buffers without aux data

Daniel Stone daniels at collabora.com
Tue Jun 6 17:20:13 UTC 2017


From: Varad Gautam <varad.gautam at collabora.com>

v2: split this into a separate patch (Jason)

Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Signed-off-by: Daniel Stone <daniels at collabora.com>
Cc: Jason Ekstrand <jason at jlekstrand.net>
---
 src/mesa/drivers/dri/i965/brw_context.c       | 3 +++
 src/mesa/drivers/dri/i965/intel_fbo.h         | 7 +++++++
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 ++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 0a5120d32d..5a3a5e4cce 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1725,6 +1725,9 @@ intel_update_image_buffer(struct brw_context *intel,
    if (last_mt && last_mt->bo == buffer->bo)
       return;
 
+   if (!buffer->aux_offset)
+      rb->no_aux = true;
+
    intel_update_winsys_renderbuffer_miptree(intel, rb, buffer->bo,
                                             buffer->width, buffer->height,
                                             buffer->pitch);
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.h b/src/mesa/drivers/dri/i965/intel_fbo.h
index 2d2ef1ebc6..7fd95bb816 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.h
+++ b/src/mesa/drivers/dri/i965/intel_fbo.h
@@ -111,6 +111,13 @@ struct intel_renderbuffer
     * for the duration of a mapping.
     */
    bool singlesample_mt_is_tmp;
+
+   /**
+    * Set to true if this buffer definitely does not have auxiliary data, like
+    * CCS, associated with it. It's generally to be used when importing a
+    * DRIimage, where that DRIimage had no modifier.
+    */
+   bool no_aux;
 };
 
 
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 2b6beab83f..d321ce85e7 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -899,7 +899,8 @@ intel_update_winsys_renderbuffer_miptree(struct brw_context *intel,
                                                  height,
                                                  1,
                                                  pitch,
-                                                 MIPTREE_LAYOUT_FOR_SCANOUT);
+                                                 MIPTREE_LAYOUT_FOR_SCANOUT |
+                                                 irb->no_aux ? MIPTREE_LAYOUT_DISABLE_AUX: 0);
    if (!singlesample_mt)
       goto fail;
 
-- 
2.13.0



More information about the mesa-dev mailing list