[Mesa-dev] [PATCH V5 3/7] intel: Expose intel_miptree_create_internal as intel_miptree_create_layout.

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Thu Jan 17 07:48:57 PST 2013


Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |   37 ++++++++++++------------
 src/mesa/drivers/dri/intel/intel_mipmap_tree.h |   14 ++++++++-
 2 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 8d814bd..cc74d3c 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -71,18 +71,18 @@ target_to_target(GLenum target)
  *        intel_miptree_create_for_region(). If true, then do not create
  *        \c stencil_mt.
  */
-static struct intel_mipmap_tree *
-intel_miptree_create_internal(struct intel_context *intel,
-			      GLenum target,
-			      gl_format format,
-			      GLuint first_level,
-			      GLuint last_level,
-			      GLuint width0,
-			      GLuint height0,
-			      GLuint depth0,
-			      bool for_region,
-                              GLuint num_samples,
-                              enum intel_msaa_layout msaa_layout)
+struct intel_mipmap_tree *
+intel_miptree_create_layout(struct intel_context *intel,
+                            GLenum target,
+                            gl_format format,
+                            GLuint first_level,
+                            GLuint last_level,
+                            GLuint width0,
+                            GLuint height0,
+                            GLuint depth0,
+                            bool for_region,
+                            GLuint num_samples,
+                            enum intel_msaa_layout msaa_layout)
 {
    struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1);
    int compress_byte = 0;
@@ -262,7 +262,7 @@ intel_miptree_create(struct intel_context *intel,
 	 tiling = I915_TILING_X;
    }
 
-   mt = intel_miptree_create_internal(intel, target, format,
+   mt = intel_miptree_create_layout(intel, target, format,
 				      first_level, last_level, width0,
 				      height0, depth0,
 				      false, num_samples, msaa_layout);
@@ -305,7 +305,6 @@ intel_miptree_create(struct intel_context *intel,
    return mt;
 }
 
-
 struct intel_mipmap_tree *
 intel_miptree_create_for_region(struct intel_context *intel,
 				GLenum target,
@@ -314,11 +313,11 @@ intel_miptree_create_for_region(struct intel_context *intel,
 {
    struct intel_mipmap_tree *mt;
 
-   mt = intel_miptree_create_internal(intel, target, format,
-				      0, 0,
-				      region->width, region->height, 1,
-				      true, 0 /* num_samples */,
-                                      INTEL_MSAA_LAYOUT_NONE);
+   mt = intel_miptree_create_layout(intel, target, format,
+                                    0, 0,
+                                    region->width, region->height, 1,
+                                    true, 0 /* num_samples */,
+                                    INTEL_MSAA_LAYOUT_NONE);
    if (!mt)
       return mt;
 
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index eb4ad7f..1b2270a 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -387,6 +387,19 @@ struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel,
                                                enum intel_msaa_layout msaa_layout);
 
 struct intel_mipmap_tree *
+intel_miptree_create_layout(struct intel_context *intel,
+                            GLenum target,
+                            gl_format format,
+                            GLuint first_level,
+                            GLuint last_level,
+                            GLuint width0,
+                            GLuint height0,
+                            GLuint depth0,
+                            bool for_region,
+                            GLuint num_samples,
+                            enum intel_msaa_layout msaa_layout);
+
+struct intel_mipmap_tree *
 intel_miptree_create_for_region(struct intel_context *intel,
 				GLenum target,
 				gl_format format,
@@ -398,7 +411,6 @@ intel_miptree_create_for_dri2_buffer(struct intel_context *intel,
                                      gl_format format,
                                      uint32_t num_samples,
                                      struct intel_region *region);
-
 /**
  * Create a miptree appropriate as the storage for a non-texture renderbuffer.
  * The miptree has the following properties:
-- 
1.7.9.5



More information about the mesa-dev mailing list