[Mesa-dev] [PATCH 22.5/23] mesa: remove the gl_sl_pragmas structure

Jason Ekstrand jason at jlekstrand.net
Wed Apr 22 09:41:46 PDT 2015


This code was added by Brian Paul in 2009 but, as far as Matt and I can
tell, it's been dead ever since the new GLSL compiler was added.
---
 src/glsl/standalone_scaffolding.cpp |  3 ---
 src/mesa/main/mtypes.h              | 13 -------------
 src/mesa/main/shaderapi.c           |  6 ------
 3 files changed, 22 deletions(-)

diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 6f5a27f..a109c4e 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -189,9 +189,6 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    options.MaxUnrollIterations = 32;
    options.MaxIfDepth = UINT_MAX;
 
-   /* Default pragma settings */
-   options.DefaultPragmas.Optimize = true;
-
    for (int sh = 0; sh < MESA_SHADER_STAGES; ++sh)
       memcpy(&ctx->Const.ShaderCompilerOptions[sh], &options, sizeof(options));
 }
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 1c751cf..fb41430 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2365,16 +2365,6 @@ struct gl_ati_fragment_shader_state
 };
 
 
-/** Set by #pragma directives */
-struct gl_sl_pragmas
-{
-   GLboolean IgnoreOptimize;  /**< ignore #pragma optimize(on/off) ? */
-   GLboolean IgnoreDebug;     /**< ignore #pragma debug(on/off) ? */
-   GLboolean Optimize;  /**< defaults on */
-   GLboolean Debug;     /**< defaults off */
-};
-
-
 /**
  * A GLSL vertex or fragment shader object.
  */
@@ -2397,7 +2387,6 @@ struct gl_shader
 
    struct gl_program *Program;  /**< Post-compile assembly code */
    GLchar *InfoLog;
-   struct gl_sl_pragmas Pragmas;
 
    unsigned Version;       /**< GLSL version used for linking */
 
@@ -2903,8 +2892,6 @@ struct gl_shader_compiler_options
     */
    GLboolean OptimizeForAOS;
 
-   struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
-
    const struct nir_shader_compiler_options *NirOptions;
 };
 
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 77e2b87..cc001ba 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -115,9 +115,6 @@ _mesa_init_shader_state(struct gl_context *ctx)
    options.MaxUnrollIterations = 32;
    options.MaxIfDepth = UINT_MAX;
 
-   /* Default pragma settings */
-   options.DefaultPragmas.Optimize = GL_TRUE;
-
    for (sh = 0; sh < MESA_SHADER_STAGES; ++sh)
       memcpy(&ctx->Const.ShaderCompilerOptions[sh], &options, sizeof(options));
 
@@ -872,9 +869,6 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
 
    options = &ctx->Const.ShaderCompilerOptions[sh->Stage];
 
-   /* set default pragma state for shader */
-   sh->Pragmas = options->DefaultPragmas;
-
    if (!sh->Source) {
       /* If the user called glCompileShader without first calling
        * glShaderSource, we should fail to compile, but not raise a GL_ERROR.
-- 
2.3.5



More information about the mesa-dev mailing list