[Mesa-dev] [PATCH 02/15] mesa: Remove unused field gl_program::Varying

Ian Romanick idr at freedesktop.org
Thu Sep 29 10:51:52 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

Lots of things set and copy this field around, but nothing uses it.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/mtypes.h                     |    2 --
 src/mesa/program/ir_to_mesa.cpp            |    2 --
 src/mesa/program/program.c                 |    5 -----
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp |    3 ---
 4 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index be43434..70f33ff 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1834,8 +1834,6 @@ struct gl_program
    /** Numbered local parameters */
    GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4];
 
-   /** Vertex/fragment shader varying vars */
-   struct gl_program_parameter_list *Varying;
    /** Vertex program user-defined attributes */
    struct gl_program_parameter_list *Attributes;
 
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index c5b71b3..5992e20 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3045,7 +3045,6 @@ get_mesa_program(struct gl_context *ctx,
    if (!prog)
       return NULL;
    prog->Parameters = _mesa_new_parameter_list();
-   prog->Varying = _mesa_new_parameter_list();
    prog->Attributes = _mesa_new_parameter_list();
    v.ctx = ctx;
    v.prog = prog;
@@ -3434,7 +3433,6 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
       }
    }
 
-   prog->Varying = _mesa_new_parameter_list();
    _mesa_reference_vertprog(ctx, &prog->VertexProgram, NULL);
    _mesa_reference_fragprog(ctx, &prog->FragmentProgram, NULL);
    _mesa_reference_geomprog(ctx, &prog->GeometryProgram, NULL);
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index ecff234..bdab304 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -394,9 +394,6 @@ _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog)
    if (prog->Parameters) {
       _mesa_free_parameter_list(prog->Parameters);
    }
-   if (prog->Varying) {
-      _mesa_free_parameter_list(prog->Varying);
-   }
    if (prog->Attributes) {
       _mesa_free_parameter_list(prog->Attributes);
    }
@@ -522,8 +519,6 @@ _mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog)
    if (prog->Parameters)
       clone->Parameters = _mesa_clone_parameter_list(prog->Parameters);
    memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams));
-   if (prog->Varying)
-      clone->Varying = _mesa_clone_parameter_list(prog->Varying);
    if (prog->Attributes)
       clone->Attributes = _mesa_clone_parameter_list(prog->Attributes);
    memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams));
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index f68270d..b8ca2c1 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3987,7 +3987,6 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp,
    prog->Parameters = _mesa_combine_parameter_lists(params,
                                                     original->prog->Parameters);
    prog->Attributes = _mesa_clone_parameter_list(original->prog->Attributes);
-   prog->Varying = _mesa_clone_parameter_list(original->prog->Varying);
    _mesa_free_parameter_list(params);
    count_resources(v, prog);
    fp->glsl_to_tgsi = v;
@@ -4063,7 +4062,6 @@ get_bitmap_visitor(struct st_fragment_program *fp,
    /* Make modifications to fragment program info. */
    prog->Parameters = _mesa_clone_parameter_list(original->prog->Parameters);
    prog->Attributes = _mesa_clone_parameter_list(original->prog->Attributes);
-   prog->Varying = _mesa_clone_parameter_list(original->prog->Varying);
    count_resources(v, prog);
    fp->glsl_to_tgsi = v;
 }
@@ -4969,7 +4967,6 @@ get_mesa_program(struct gl_context *ctx,
    if (!prog)
       return NULL;
    prog->Parameters = _mesa_new_parameter_list();
-   prog->Varying = _mesa_new_parameter_list();
    prog->Attributes = _mesa_new_parameter_list();
    v->ctx = ctx;
    v->prog = prog;
-- 
1.7.6



More information about the mesa-dev mailing list