st/mesa: fix comments, whitespace
[mesa.git] / src / mesa / state_tracker / st_texture.h
index c78901c0360d25c485649ee4821e0b8a16ca9541..d50c3c9af79a01b743d0f109b1afa58b548bd5d8 100644 (file)
@@ -71,7 +71,10 @@ struct st_texture_object
     */
    GLuint lastLevel;
 
-   /** The size of the level=0 mipmap image */
+   /** The size of the level=0 mipmap image.
+    * Note that the number of 1D array layers will be in height0 and the
+    * number of 2D array layers will be in depth0, as in GL.
+    */
    GLuint width0, height0, depth0;
 
    /* On validation any active images held in main memory or in other
@@ -125,9 +128,7 @@ st_create_texture_sampler_view(struct pipe_context *pipe,
 {
    struct pipe_sampler_view templ;
 
-   u_sampler_view_default_template(&templ,
-                                   texture,
-                                   texture->format);
+   u_sampler_view_default_template(&templ, texture, texture->format);
 
    return pipe->create_sampler_view(pipe, texture, &templ);
 }
@@ -140,17 +141,15 @@ st_create_texture_sampler_view_format(struct pipe_context *pipe,
 {
    struct pipe_sampler_view templ;
 
-   u_sampler_view_default_template(&templ,
-                                   texture,
-                                   format);
+   u_sampler_view_default_template(&templ, texture, format);
 
    return pipe->create_sampler_view(pipe, texture, &templ);
 }
 
+
 static INLINE struct pipe_sampler_view *
 st_get_texture_sampler_view(struct st_texture_object *stObj,
                             struct pipe_context *pipe)
-
 {
    if (!stObj || !stObj->pt) {
       return NULL;
@@ -172,9 +171,20 @@ st_texture_create(struct st_context *st,
                   GLuint width0,
                   GLuint height0,
                   GLuint depth0,
+                  GLuint layers,
                   GLuint tex_usage );
 
 
+extern void
+st_gl_texture_dims_to_pipe_dims(GLenum texture,
+                                GLuint widthIn,
+                                GLuint heightIn,
+                                GLuint depthIn,
+                                GLuint *widthOut,
+                                GLuint *heightOut,
+                                GLuint *depthOut,
+                                GLuint *layersOut);
+
 /* Check if an image fits into an existing texture object.
  */
 extern GLboolean