summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaura Ekstrand <laura@jlekstrand.net>2016-08-24 12:49:19 -0700
committerLaura Ekstrand <laura@jlekstrand.net>2016-08-24 12:49:19 -0700
commit19c55a49dc539f97bbd5a47aa3e4ae5f6ddee10b (patch)
tree488b1a975b6103e7fb69fbcc1b64cb647fe6de63
parent361678edd776ca3012cbe231167e740f7af9c0b0 (diff)
i965: Add an isl_surf to intel_mipmap_tree.mesa-isl-ify
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c8
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.h7
2 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 0836b92f98..d1e9606120 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -579,6 +579,14 @@ intel_miptree_create_layout(struct brw_context *brw,
if (mt->disable_aux_buffers)
assert(mt->msaa_layout != INTEL_MSAA_LAYOUT_CMS);
+ /**
+ * Initialize the isl_surf from the information computed and stored in mt
+ * above. Note that this is not the optimal way to make an isl_surf, but
+ * this is the workaround we are using at this time to ensure compatibility
+ * with the old code.
+ */
+ intel_miptree_get_isl_surf(brw, mt, &mt->surf);
+
return mt;
}
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index c28fb3364f..09b52f6db1 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -673,6 +673,13 @@ struct intel_mipmap_tree
/* These are also refcounted:
*/
GLuint refcount;
+
+ /**
+ * Alternatively, use an ISL surf to handle all these calculations.
+ * In the future, this ISL surf *should* be the only member of
+ * intel_mipmap_tree.
+ */
+ struct isl_surf surf;
};
void