[Mesa-dev] [PATCH 2/5] mesa: remove useless gl_compute_program_state::Current

Marek Olšák maraeo at gmail.com
Thu May 28 16:57:45 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

This is for user assembly shaders only (not GLSL). We won't support those.
---
 src/mesa/main/mtypes.h     | 2 --
 src/mesa/program/program.c | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 96ef060..47be72d 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2314,8 +2314,6 @@ struct gl_fragment_program_state
  */
 struct gl_compute_program_state
 {
-   struct gl_compute_program *Current;  /**< user-bound compute program */
-
    /** Currently enabled and valid program (including internal programs
     * and compiled shader programs).
     */
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index f0a47ac..1167adf 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -97,8 +97,6 @@ _mesa_init_program(struct gl_context *ctx)
    assert(ctx->FragmentProgram.Current);
    ctx->FragmentProgram.Cache = _mesa_new_program_cache();
 
-   _mesa_reference_compprog(ctx, &ctx->ComputeProgram.Current, NULL);
-
    /* XXX probably move this stuff */
    ctx->ATIFragmentShader.Enabled = GL_FALSE;
    ctx->ATIFragmentShader.Current = ctx->Shared->DefaultFragmentShader;
@@ -117,7 +115,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_compprog(ctx, &ctx->ComputeProgram.Current, NULL);
 
    /* XXX probably move this stuff */
    if (ctx->ATIFragmentShader.Current) {
-- 
2.1.0



More information about the mesa-dev mailing list