st/mesa: formatting, whitespace fixes
authorBrian Paul <brianp@vmware.com>
Thu, 20 Jan 2011 15:38:19 +0000 (08:38 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 20 Jan 2011 15:56:32 +0000 (08:56 -0700)
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_texture.h

index 422ae43585b95c39ce4157a74fc76a0864a976f9..eb8bbeb853f94436ad52a23cbda31964275645d0 100644 (file)
@@ -45,6 +45,7 @@
 #include "util/u_inlines.h"
 #include "cso_cache/cso_context.h"
 
+
 /**
  * Combine depth texture mode with "swizzle" so that depth mode swizzling
  * takes place before texture swizzling, and return the resulting swizzle.
@@ -54,8 +55,8 @@
  * \param swizzle    Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
  * \param depthmode  One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA, GL_RED.
  */
-static GLuint apply_depthmode(enum pipe_format format,
-                              GLuint swizzle, GLenum depthmode)
+static GLuint
+apply_depthmode(enum pipe_format format, GLuint swizzle, GLenum depthmode)
 {
    const struct util_format_description *desc =
          util_format_description(format);
@@ -109,6 +110,7 @@ static GLuint apply_depthmode(enum pipe_format format,
    return MAKE_SWIZZLE4(swiz[0], swiz[1], swiz[2], swiz[3]);
 }
 
+
 /**
  * Return TRUE if the swizzling described by "swizzle" and
  * "depthmode" (for depth textures only) is different from the swizzling
@@ -118,8 +120,9 @@ static GLuint apply_depthmode(enum pipe_format format,
  * \param swizzle    Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
  * \param depthmode  One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA.
  */
-static boolean check_sampler_swizzle(struct pipe_sampler_view *sv,
-                                     GLuint swizzle, GLenum depthmode)
+static boolean
+check_sampler_swizzle(struct pipe_sampler_view *sv,
+                      GLuint swizzle, GLenum depthmode)
 {
    swizzle = apply_depthmode(sv->texture->format, swizzle, depthmode);
 
@@ -127,15 +130,15 @@ static boolean check_sampler_swizzle(struct pipe_sampler_view *sv,
        (sv->swizzle_g != GET_SWZ(swizzle, 1)) ||
        (sv->swizzle_b != GET_SWZ(swizzle, 2)) ||
        (sv->swizzle_a != GET_SWZ(swizzle, 3)))
-      return true;
-   return false;
+      return TRUE;
+   return FALSE;
 }
 
+
 static INLINE struct pipe_sampler_view *
 st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe,
                                          struct st_texture_object *stObj,
                                          enum pipe_format format)
-                                         
 {
    struct pipe_sampler_view templ;
    GLuint swizzle = apply_depthmode(stObj->pt->format,
@@ -161,19 +164,20 @@ static INLINE struct pipe_sampler_view *
 st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj,
                                       struct pipe_context *pipe,
                                       enum pipe_format format)
-
 {
    if (!stObj || !stObj->pt) {
       return NULL;
    }
 
    if (!stObj->sampler_view) {
-      stObj->sampler_view = st_create_texture_sampler_view_from_stobj(pipe, stObj, format);
+      stObj->sampler_view =
+         st_create_texture_sampler_view_from_stobj(pipe, stObj, format);
    }
 
    return stObj->sampler_view;
 }
 
+
 static void 
 update_textures(struct st_context *st)
 {
@@ -221,7 +225,8 @@ update_textures(struct st_context *st)
            firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]);
 
            firstImageFormat = st_mesa_format_to_pipe_format(firstImage->base.TexFormat);
-           if ((stObj->base.sRGBDecode == GL_SKIP_DECODE_EXT) && (_mesa_get_format_color_encoding(firstImage->base.TexFormat) == GL_SRGB)) {
+           if ((stObj->base.sRGBDecode == GL_SKIP_DECODE_EXT) &&
+                (_mesa_get_format_color_encoding(firstImage->base.TexFormat) == GL_SRGB)) {
               firstImageFormat = st_mesa_format_to_pipe_format(_mesa_get_srgb_format_linear(firstImage->base.TexFormat));
            }
 
index c78901c0360d25c485649ee4821e0b8a16ca9541..bca856d71428a7b243b3c6f02875c35dde393ff1 100644 (file)
@@ -125,9 +125,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 +138,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;