summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-05-20 13:29:39 -0700
committerPaul Berry <[email protected]>2013-06-12 10:45:42 -0700
commit8f5147c199748ae129c527322823c2b40fb36941 (patch)
tree318bb0fcd6d4d653fc0813102b79994b6fc153f7
parenta5efdca7b70a237b8786c595453f4599e38263ea (diff)
intel: Conditionally compile mcs-related code for i965 only.
This patch ifdefs out intel_mipmap_tree::mcs_mt when building the i915 (pre-Gen4) driver (MCS buffers aren't supported until Gen7, so there is no need for this field in the i915 driver). This should make it a bit easier to implement fast color clears without undue risk to i915. Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 08b5d428107..ee763e52020 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -671,7 +671,9 @@ intel_miptree_release(struct intel_mipmap_tree **mt)
intel_region_release(&((*mt)->region));
intel_miptree_release(&(*mt)->stencil_mt);
intel_miptree_release(&(*mt)->hiz_mt);
+#ifndef I915
intel_miptree_release(&(*mt)->mcs_mt);
+#endif
intel_miptree_release(&(*mt)->singlesample_mt);
intel_resolve_map_clear(&(*mt)->hiz_map);
@@ -1012,8 +1014,11 @@ intel_miptree_alloc_mcs(struct intel_context *intel,
struct intel_mipmap_tree *mt,
GLuint num_samples)
{
- assert(mt->mcs_mt == NULL);
assert(intel->gen >= 7); /* MCS only used on Gen7+ */
+#ifdef I915
+ return false;
+#else
+ assert(mt->mcs_mt == NULL);
/* Choose the correct format for the MCS buffer. All that really matters
* is that we allocate the right buffer size, since we'll always be
@@ -1070,6 +1075,7 @@ intel_miptree_alloc_mcs(struct intel_context *intel,
intel_miptree_unmap_raw(intel, mt->mcs_mt);
return mt->mcs_mt;
+#endif
}
/**
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index cac518cc749..639d4be94c2 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -373,6 +373,7 @@ struct intel_mipmap_tree
*/
struct intel_mipmap_tree *stencil_mt;
+#ifndef I915
/**
* \brief MCS miptree for multisampled textures.
*
@@ -381,6 +382,7 @@ struct intel_mipmap_tree
* (INTEL_MSAA_FORMAT_CMS).
*/
struct intel_mipmap_tree *mcs_mt;
+#endif
/* These are also refcounted:
*/