Deprecate --glx-use-gpushader4

Original develop commented in the man page: My tests ... show no noticeable
effect.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-09 18:29:01 +00:00
parent c5d9f459dd
commit 710ff2fd42
6 changed files with 13 additions and 19 deletions

View File

@ -95,8 +95,6 @@ typedef struct options_t {
bool glx_no_rebind_pixmap;
/// GLX swap method we assume OpenGL uses.
int glx_swap_method;
/// Whether to use GL_EXT_gpu_shader4 to (hopefully) accelerates blurring.
bool glx_use_gpushader4;
/// Custom fragment shader for painting windows, as a string.
char *glx_fshader_win_str;
/// Whether to detect rounded corners.

View File

@ -398,7 +398,10 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
}
}
// --glx-use-gpushader4
lcfg_lookup_bool(&cfg, "glx-use-gpushader4", &opt->glx_use_gpushader4);
if (config_lookup_bool(&cfg, "glx-use-gpushader4", &ival) && ival) {
log_warn("glx-use-gpushader4 is deprecated since v6, please remove it from"
"your config file");
}
// --xrender-sync
if (config_lookup_bool(&cfg, "xrender-sync", &ival) && ival) {
log_warn("Please use xrender-sync-fence instead of xrender-sync.");

View File

@ -310,8 +310,6 @@ glx_init_blur(session_t *ps) {
" vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);\n";
static const char *FRAG_SHADER_BLUR_ADD =
" sum += float(%.7g) * %s(tex_scr, vec2(gl_TexCoord[0].x + offset_x * float(%d), gl_TexCoord[0].y + offset_y * float(%d)));\n";
static const char *FRAG_SHADER_BLUR_ADD_GPUSHADER4 =
" sum += float(%.7g) * %sOffset(tex_scr, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y), ivec2(%d, %d));\n";
static const char *FRAG_SHADER_BLUR_SUFFIX =
" sum += %s(tex_scr, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y)) * factor_center;\n"
" gl_FragColor = sum / (factor_center + float(%.7g));\n"
@ -327,10 +325,6 @@ glx_init_blur(session_t *ps) {
if (use_texture_rect) {
mstrextend(&extension, "#extension GL_ARB_texture_rectangle : require\n");
}
if (ps->o.glx_use_gpushader4) {
mstrextend(&extension, "#extension GL_EXT_gpu_shader4 : require\n");
shader_add = FRAG_SHADER_BLUR_ADD_GPUSHADER4;
}
if (!extension) {
extension = strdup("");
}
@ -402,10 +396,8 @@ glx_init_blur(session_t *ps) {
}
P_GET_UNIFM_LOC("factor_center", unifm_factor_center);
if (!ps->o.glx_use_gpushader4) {
P_GET_UNIFM_LOC("offset_x", unifm_offset_x);
P_GET_UNIFM_LOC("offset_y", unifm_offset_y);
}
P_GET_UNIFM_LOC("offset_x", unifm_offset_x);
P_GET_UNIFM_LOC("offset_y", unifm_offset_y);
#undef P_GET_UNIFM_LOC
}

View File

@ -715,7 +715,11 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
exit(1);
break;
P_CASELONG(302, resize_damage);
P_CASEBOOL(303, glx_use_gpushader4);
case 303:
// --glx-use-gpushader4
log_warn("--glx-use-gpushader4 is deprecated since v6."
" Please remove it from command line options.");
break;
case 304:
// --opacity-rule
if (!parse_rule_opacity(&opt->opacity_rules, optarg))
@ -816,7 +820,8 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
// Fill default blur kernel
if (opt->blur_background && !opt->blur_kerns[0]) {
CHECK(parse_blur_kern_lst("3x3box", opt->blur_kerns, MAX_BLUR_PASS, &conv_kern_hasneg));
CHECK(parse_blur_kern_lst("3x3box", opt->blur_kerns, MAX_BLUR_PASS,
&conv_kern_hasneg));
}
if (opt->resize_damage < 0) {