[Mesa-dev] [PATCH 2/3] st/mesa: whitespace/formatting fixes in st_atom_constbuf.c

Brian Paul brianp at vmware.com
Thu Mar 22 15:29:15 UTC 2018


---
 src/mesa/state_tracker/st_atom_constbuf.c | 57 +++++++++++++++++++------------
 1 file changed, 36 insertions(+), 21 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 87a72b2..0c094dc 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -1,8 +1,8 @@
 /**************************************************************************
- * 
+ *
  * Copyright 2007 VMware, Inc.
  * All Rights Reserved.
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the
  * "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
  * distribute, sub license, and/or sell copies of the Software, and to
  * permit persons to whom the Software is furnished to do so, subject to
  * the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice (including the
  * next paragraph) shall be included in all copies or substantial portions
  * of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * 
+ *
  **************************************************************************/
 
 /*
@@ -52,7 +52,8 @@
  * Pass the given program parameters to the graphics pipe as a
  * constant buffer.
  */
-void st_upload_constants(struct st_context *st, struct gl_program *prog)
+void
+st_upload_constants(struct st_context *st, struct gl_program *prog)
 {
    gl_shader_stage stage = prog->info.stage;
    struct gl_program_parameter_list *params = prog->Parameters;
@@ -77,7 +78,8 @@ void st_upload_constants(struct st_context *st, struct gl_program *prog)
                    ati_fs->Constants[c], sizeof(GLfloat) * 4);
          else
             memcpy(params->ParameterValues + offset,
-                   st->ctx->ATIFragmentShader.GlobalConstants[c], sizeof(GLfloat) * 4);
+                   st->ctx->ATIFragmentShader.GlobalConstants[c],
+                   sizeof(GLfloat) * 4);
       }
    }
 
@@ -132,7 +134,8 @@ void st_upload_constants(struct st_context *st, struct gl_program *prog)
 /**
  * Vertex shader:
  */
-void st_update_vs_constants(struct st_context *st )
+void
+st_update_vs_constants(struct st_context *st)
 {
    st_upload_constants(st, &st->vp->Base);
 }
@@ -140,7 +143,8 @@ void st_update_vs_constants(struct st_context *st )
 /**
  * Fragment shader:
  */
-void st_update_fs_constants(struct st_context *st )
+void
+st_update_fs_constants(struct st_context *st)
 {
    st_upload_constants(st, &st->fp->Base);
 }
@@ -148,7 +152,8 @@ void st_update_fs_constants(struct st_context *st )
 
 /* Geometry shader:
  */
-void st_update_gs_constants(struct st_context *st )
+void
+st_update_gs_constants(struct st_context *st)
 {
    struct st_common_program *gp = st->gp;
 
@@ -158,7 +163,8 @@ void st_update_gs_constants(struct st_context *st )
 
 /* Tessellation control shader:
  */
-void st_update_tcs_constants(struct st_context *st )
+void
+st_update_tcs_constants(struct st_context *st)
 {
    struct st_common_program *tcp = st->tcp;
 
@@ -168,7 +174,8 @@ void st_update_tcs_constants(struct st_context *st )
 
 /* Tessellation evaluation shader:
  */
-void st_update_tes_constants(struct st_context *st )
+void
+st_update_tes_constants(struct st_context *st)
 {
    struct st_common_program *tep = st->tep;
 
@@ -178,7 +185,8 @@ void st_update_tes_constants(struct st_context *st )
 
 /* Compute shader:
  */
-void st_update_cs_constants(struct st_context *st )
+void
+st_update_cs_constants(struct st_context *st)
 {
    struct st_compute_program *cp = st->cp;
 
@@ -186,8 +194,9 @@ void st_update_cs_constants(struct st_context *st )
       st_upload_constants(st, &cp->Base);
 }
 
-static void st_bind_ubos(struct st_context *st, struct gl_program *prog,
-                         unsigned shader_type)
+static void
+st_bind_ubos(struct st_context *st, struct gl_program *prog,
+             unsigned shader_type)
 {
    unsigned i;
    struct pipe_constant_buffer cb = { 0 };
@@ -224,7 +233,8 @@ static void st_bind_ubos(struct st_context *st, struct gl_program *prog,
    }
 }
 
-void st_bind_vs_ubos(struct st_context *st)
+void
+st_bind_vs_ubos(struct st_context *st)
 {
    struct gl_program *prog =
       st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
@@ -232,7 +242,8 @@ void st_bind_vs_ubos(struct st_context *st)
    st_bind_ubos(st, prog, PIPE_SHADER_VERTEX);
 }
 
-void st_bind_fs_ubos(struct st_context *st)
+void
+st_bind_fs_ubos(struct st_context *st)
 {
    struct gl_program *prog =
       st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
@@ -240,7 +251,8 @@ void st_bind_fs_ubos(struct st_context *st)
    st_bind_ubos(st, prog, PIPE_SHADER_FRAGMENT);
 }
 
-void st_bind_gs_ubos(struct st_context *st)
+void
+st_bind_gs_ubos(struct st_context *st)
 {
    struct gl_program *prog =
       st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
@@ -248,7 +260,8 @@ void st_bind_gs_ubos(struct st_context *st)
    st_bind_ubos(st, prog, PIPE_SHADER_GEOMETRY);
 }
 
-void st_bind_tcs_ubos(struct st_context *st)
+void
+st_bind_tcs_ubos(struct st_context *st)
 {
    struct gl_program *prog =
       st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_CTRL];
@@ -256,7 +269,8 @@ void st_bind_tcs_ubos(struct st_context *st)
    st_bind_ubos(st, prog, PIPE_SHADER_TESS_CTRL);
 }
 
-void st_bind_tes_ubos(struct st_context *st)
+void
+st_bind_tes_ubos(struct st_context *st)
 {
    struct gl_program *prog =
       st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
@@ -264,7 +278,8 @@ void st_bind_tes_ubos(struct st_context *st)
    st_bind_ubos(st, prog, PIPE_SHADER_TESS_EVAL);
 }
 
-void st_bind_cs_ubos(struct st_context *st)
+void
+st_bind_cs_ubos(struct st_context *st)
 {
    struct gl_program *prog =
       st->ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
-- 
2.7.4



More information about the mesa-dev mailing list