{ "dump-builder", no_argument, &options.dump_builder, 1 },
{ "link", no_argument, &options.do_link, 1 },
{ "just-log", no_argument, &options.just_log, 1 },
+ { "lower-precision", no_argument, &options.lower_precision, 1 },
{ "version", required_argument, NULL, 'v' },
{ NULL, 0, NULL, 0 }
};
initialize_context(ctx, options->glsl_version > 130 ? API_OPENGL_CORE : API_OPENGL_COMPAT);
}
+ if (options->lower_precision) {
+ for (unsigned i = MESA_SHADER_VERTEX; i <= MESA_SHADER_FRAGMENT; i++) {
+ struct gl_shader_compiler_options *options =
+ &ctx->Const.ShaderCompilerOptions[i];
+ options->LowerPrecision = true;
+ }
+ }
+
struct gl_shader_program *whole_program;
whole_program = rzalloc (NULL, struct gl_shader_program);