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));
}
};
-/** 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.
*/
struct gl_program *Program; /**< Post-compile assembly code */
GLchar *InfoLog;
- struct gl_sl_pragmas Pragmas;
unsigned Version; /**< GLSL version used for linking */
*/
GLboolean OptimizeForAOS;
- struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
-
const struct nir_shader_compiler_options *NirOptions;
};
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));
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.