diff options
author | Timothy Arceri <[email protected]> | 2017-03-30 22:14:21 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-31 13:43:38 +1100 |
commit | 2caa3aa1f4fed5fd336dbbdb77eeb2e29730a204 (patch) | |
tree | bd2db62d3bbc4f448c64e6469b172cdca11315c0 | |
parent | 94224950ddb609bfbee1ffb0ca3621c0bda6101f (diff) |
mesa: remove MESA_GLSL=no_opts env option
This is confusing because is only applys to GL_ARB_vertex/fragment_program,
and because of that its also not very useful.
If someone requires this for debugging they can just make an ad-hoc
code change.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | docs/shading.html | 1 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 15 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 | ||||
-rw-r--r-- | src/mesa/program/arbprogparse.c | 3 | ||||
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 4 |
5 files changed, 9 insertions, 16 deletions
diff --git a/docs/shading.html b/docs/shading.html index a28c5b33b04..cd01af00d90 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -50,7 +50,6 @@ execution. These are generally used for debugging. The filenames will be "shader_X.vert" or "shader_X.frag" where X the shader ID. <li><b>cache_info</b> - print debug information about shader cache -<li><b>nopt</b> - disable compiler optimizations <li><b>opt</b> - force compiler optimizations <li><b>uniform</b> - print message to stdout when glUniform is called <li><b>nopvert</b> - force vertex shaders to be a simple shader that just transforms diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 91e1948c232..84a75c53cd0 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2883,14 +2883,13 @@ struct gl_shader_program #define GLSL_DUMP 0x1 /**< Dump shaders to stdout */ #define GLSL_LOG 0x2 /**< Write shaders to files */ #define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ -#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ -#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ -#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */ -#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */ -#define GLSL_USE_PROG 0x80 /**< Log glUseProgram calls */ -#define GLSL_REPORT_ERRORS 0x100 /**< Print compilation errors */ -#define GLSL_DUMP_ON_ERROR 0x200 /**< Dump shaders to stderr on compile error */ -#define GLSL_CACHE_INFO 0x400 /**< Print debug information about shader cache */ +#define GLSL_UNIFORMS 0x8 /**< Print glUniform calls */ +#define GLSL_NOP_VERT 0x10 /**< Force no-op vertex shaders */ +#define GLSL_NOP_FRAG 0x20 /**< Force no-op fragment shaders */ +#define GLSL_USE_PROG 0x40 /**< Log glUseProgram calls */ +#define GLSL_REPORT_ERRORS 0x80 /**< Print compilation errors */ +#define GLSL_DUMP_ON_ERROR 0x100 /**< Dump shaders to stderr on compile error */ +#define GLSL_CACHE_INFO 0x200 /**< Print debug information about shader cache */ /** diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index ba69ede0e84..3d77448f9a5 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -83,8 +83,6 @@ _mesa_get_shader_flags(void) flags |= GLSL_NOP_VERT; if (strstr(env, "nopfrag")) flags |= GLSL_NOP_FRAG; - if (strstr(env, "nopt")) - flags |= GLSL_NO_OPT; else if (strstr(env, "opt")) flags |= GLSL_OPT; if (strstr(env, "uniform")) diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c index 9b843f628c1..07bdf1603ef 100644 --- a/src/mesa/program/arbprogparse.c +++ b/src/mesa/program/arbprogparse.c @@ -180,8 +180,7 @@ _mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target, return; } - if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0) - _mesa_optimize_program(ctx, &prog, program); + _mesa_optimize_program(ctx, &prog, program); ralloc_free(program->String); diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 3898cb8d09a..a2476ddbf58 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2979,9 +2979,7 @@ get_mesa_program(struct gl_context *ctx, prog->info.fs.depth_layout = shader_program->FragDepthLayout; } - if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0) { - _mesa_optimize_program(ctx, prog, prog); - } + _mesa_optimize_program(ctx, prog, prog); /* This has to be done last. Any operation that can cause * prog->ParameterValues to get reallocated (e.g., anything that adds a |