[Mesa-dev] [PATCH 07/30] mesa: Fold long lines introduced by the previous patch.

Paul Berry stereotype441 at gmail.com
Thu Jan 9 18:19:08 PST 2014


---
 src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 6 ++++--
 src/mesa/drivers/dri/i965/brw_vec4_gs.c          | 5 +++--
 src/mesa/drivers/dri/i965/brw_vs.c               | 5 +++--
 src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 6 ++++--
 src/mesa/main/context.c                          | 6 ++++--
 src/mesa/main/state.c                            | 9 ++++++---
 src/mesa/main/transformfeedback.c                | 3 ++-
 src/mesa/state_tracker/st_atom_constbuf.c        | 9 ++++++---
 8 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
index 1ccf2e2..0795e56 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
@@ -69,7 +69,8 @@ brw_upload_gs_ubo_surfaces(struct brw_context *brw)
    struct gl_context *ctx = &brw->ctx;
 
    /* _NEW_PROGRAM */
-   struct gl_shader_program *prog = ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
+   struct gl_shader_program *prog =
+      ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
 
    if (!prog)
       return;
@@ -93,7 +94,8 @@ brw_upload_gs_abo_surfaces(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
    /* _NEW_PROGRAM */
-   struct gl_shader_program *prog = ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
+   struct gl_shader_program *prog =
+      ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
 
    if (prog) {
       /* CACHE_NEW_GS_PROG */
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs.c b/src/mesa/drivers/dri/i965/brw_vec4_gs.c
index 7a803cb..e2a4a38 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs.c
@@ -290,8 +290,9 @@ brw_upload_gs_prog(struct brw_context *brw)
    if (!brw_search_cache(&brw->cache, BRW_GS_PROG,
                          &key, sizeof(key),
                          &stage_state->prog_offset, &brw->gs.prog_data)) {
-      bool success = do_gs_prog(brw, ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY],
-                                gp, &key);
+      bool success =
+         do_gs_prog(brw, ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY], gp,
+                    &key);
       assert(success);
    }
    brw->gs.base.prog_data = &brw->gs.prog_data->base.base;
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 351a83e..971b2d1 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -481,8 +481,9 @@ static void brw_upload_vs_prog(struct brw_context *brw)
    if (!brw_search_cache(&brw->cache, BRW_VS_PROG,
 			 &key, sizeof(key),
 			 &brw->vs.base.prog_offset, &brw->vs.prog_data)) {
-      bool success = do_vs_prog(brw, ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX],
-				vp, &key);
+      bool success =
+         do_vs_prog(brw, ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX], vp,
+                    &key);
       (void) success;
       assert(success);
    }
diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
index 2fbcdf9..e707d32 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -130,7 +130,8 @@ brw_upload_vs_ubo_surfaces(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
    /* _NEW_PROGRAM */
-   struct gl_shader_program *prog = ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
+   struct gl_shader_program *prog =
+      ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
 
    if (!prog)
       return;
@@ -154,7 +155,8 @@ brw_upload_vs_abo_surfaces(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
    /* _NEW_PROGRAM */
-   struct gl_shader_program *prog = ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
+   struct gl_shader_program *prog =
+      ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
 
    if (prog) {
       /* CACHE_NEW_VS_PROG */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 8e978eb..026d7aa 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1780,7 +1780,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
 					    ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY],
                                             errMsg)) {
             _mesa_warning(ctx, "Shader program %u is invalid: %s",
-                          ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Name, errMsg);
+                          ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Name,
+                          errMsg);
          }
       }
 #endif
@@ -1801,7 +1802,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
 					    ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT],
                                             errMsg)) {
             _mesa_warning(ctx, "Shader program %u is invalid: %s",
-                          ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]->Name, errMsg);
+                          ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]->Name,
+                          errMsg);
          }
       }
 #endif
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index d8fb3b0..f13d409 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -94,9 +94,12 @@ update_program_enables(struct gl_context *ctx)
 static GLbitfield
 update_program(struct gl_context *ctx)
 {
-   const struct gl_shader_program *vsProg = ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
-   const struct gl_shader_program *gsProg = ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
-   struct gl_shader_program *fsProg = ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
+   const struct gl_shader_program *vsProg =
+      ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
+   const struct gl_shader_program *gsProg =
+      ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
+   struct gl_shader_program *fsProg =
+      ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
    const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
    const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
    const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 9eaa698..74897ba 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -393,7 +393,8 @@ _mesa_BeginTransformFeedback(GLenum mode)
       return;
    }
 
-   info = &ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->LinkedTransformFeedback;
+   info =
+      &ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->LinkedTransformFeedback;
 
    if (info->NumOutputs == 0) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 23b919b..b5ad1e8 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -218,7 +218,8 @@ static void st_bind_ubos(struct st_context *st,
 
 static void bind_vs_ubos(struct st_context *st)
 {
-   struct gl_shader_program *prog = st->ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
+   struct gl_shader_program *prog =
+      st->ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
 
    if (!prog)
       return;
@@ -237,7 +238,8 @@ const struct st_tracked_state st_bind_vs_ubos = {
 
 static void bind_fs_ubos(struct st_context *st)
 {
-   struct gl_shader_program *prog = st->ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
+   struct gl_shader_program *prog =
+      st->ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
 
    if (!prog)
       return;
@@ -256,7 +258,8 @@ const struct st_tracked_state st_bind_fs_ubos = {
 
 static void bind_gs_ubos(struct st_context *st)
 {
-   struct gl_shader_program *prog = st->ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
+   struct gl_shader_program *prog =
+      st->ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
 
    if (!prog)
       return;
-- 
1.8.5.2



More information about the mesa-dev mailing list