[Mesa-dev] [PATCH 1/5] mesa: remove unused geometry shader variables

Dave Airlie airlied at gmail.com
Thu May 28 17:21:53 PDT 2015


On 29 May 2015 at 09:57, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>

All seem fine,

For the series,

Reviewed-by: Dave Airlie <airlied at redhat.com>

>
> These states are for GS assembly shaders only. We don't support those.
> ---
>  src/mesa/main/context.c    | 1 -
>  src/mesa/main/mtypes.h     | 7 -------
>  src/mesa/main/shared.c     | 1 -
>  src/mesa/program/program.c | 9 ---------
>  4 files changed, 18 deletions(-)
>
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index e4faf3d..483e9b1 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -1333,7 +1333,6 @@ _mesa_free_context_data( struct gl_context *ctx )
>     _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
>     _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL);
>
> -   _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL);
>     _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
>
>     _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 8342517..96ef060 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -2275,16 +2275,10 @@ struct gl_vertex_program_state
>   */
>  struct gl_geometry_program_state
>  {
> -   GLboolean Enabled;               /**< GL_ARB_GEOMETRY_SHADER4 */
> -   GLboolean _Enabled;              /**< Enabled and valid program? */
> -   struct gl_geometry_program *Current;  /**< user-bound geometry program */
> -
>     /** Currently enabled and valid program (including internal programs
>      * and compiled shader programs).
>      */
>     struct gl_geometry_program *_Current;
> -
> -   GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
>  };
>
>  /**
> @@ -3004,7 +2998,6 @@ struct gl_shared_state
>     struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */
>     struct gl_vertex_program *DefaultVertexProgram;
>     struct gl_fragment_program *DefaultFragmentProgram;
> -   struct gl_geometry_program *DefaultGeometryProgram;
>     /*@}*/
>
>     /* GL_ATI_fragment_shader */
> diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
> index 0b76cc0..d5ac9f1 100644
> --- a/src/mesa/main/shared.c
> +++ b/src/mesa/main/shared.c
> @@ -313,7 +313,6 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
>     _mesa_DeleteHashTable(shared->Programs);
>
>     _mesa_reference_vertprog(ctx, &shared->DefaultVertexProgram, NULL);
> -   _mesa_reference_geomprog(ctx, &shared->DefaultGeometryProgram, NULL);
>     _mesa_reference_fragprog(ctx, &shared->DefaultFragmentProgram, NULL);
>
>     _mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx);
> diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
> index fb61f4d..f0a47ac 100644
> --- a/src/mesa/program/program.c
> +++ b/src/mesa/program/program.c
> @@ -97,11 +97,6 @@ _mesa_init_program(struct gl_context *ctx)
>     assert(ctx->FragmentProgram.Current);
>     ctx->FragmentProgram.Cache = _mesa_new_program_cache();
>
> -   ctx->GeometryProgram.Enabled = GL_FALSE;
> -   /* right now by default we don't have a geometry program */
> -   _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current,
> -                            NULL);
> -
>     _mesa_reference_compprog(ctx, &ctx->ComputeProgram.Current, NULL);
>
>     /* XXX probably move this stuff */
> @@ -122,7 +117,6 @@ _mesa_free_program_data(struct gl_context *ctx)
>     _mesa_delete_program_cache(ctx, ctx->VertexProgram.Cache);
>     _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
>     _mesa_delete_shader_cache(ctx, ctx->FragmentProgram.Cache);
> -   _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL);
>     _mesa_reference_compprog(ctx, &ctx->ComputeProgram.Current, NULL);
>
>     /* XXX probably move this stuff */
> @@ -153,9 +147,6 @@ _mesa_update_default_objects_program(struct gl_context *ctx)
>                              ctx->Shared->DefaultFragmentProgram);
>     assert(ctx->FragmentProgram.Current);
>
> -   _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current,
> -                      ctx->Shared->DefaultGeometryProgram);
> -
>     /* XXX probably move this stuff */
>     if (ctx->ATIFragmentShader.Current) {
>        ctx->ATIFragmentShader.Current->RefCount--;
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list