diff --git a/compton.sample.conf b/compton.sample.conf index 52975f5..ca655dc 100644 --- a/compton.sample.conf +++ b/compton.sample.conf @@ -71,7 +71,6 @@ invert-color-include = [ ]; # glx-no-stencil = true; # glx-no-rebind-pixmap = true; glx-swap-method = "undefined"; -# glx-use-gpushader4 = true; # xrender-sync = true; # xrender-sync-fence = true; diff --git a/man/compton.1.asciidoc b/man/compton.1.asciidoc index 9f78e40..00e259b 100644 --- a/man/compton.1.asciidoc +++ b/man/compton.1.asciidoc @@ -249,9 +249,6 @@ May also be one of the predefined kernels: `3x3box` (default), `5x5box`, `7x7box *--glx-swap-method* undefined/exchange/copy/3/4/5/6/buffer-age:: GLX backend: GLX buffer swap method we assume. Could be `undefined` (0), `copy` (1), `exchange` (2), 3-6, or `buffer-age` (-1). `undefined` is the slowest and the safest, and the default value. `copy` is fastest, but may fail on some drivers, 2-6 are gradually slower but safer (6 is still faster than 0). Usually, double buffer means 2, triple buffer means 3. `buffer-age` means auto-detect using 'GLX_EXT_buffer_age', supported by some drivers. Partially breaks `--resize-damage`. Defaults to `undefined`. -*--glx-use-gpushader4*:: - GLX backend: Use 'GL_EXT_gpu_shader4' for some optimization on blur GLSL code. My tests on GTX 670 show no noticeable effect. - *--xrender-sync-fence*:: Use X Sync fence to sync clients' draw calls, to make sure all draw calls are finished before compton starts drawing. Needed on nvidia-drivers with GLX backend for some users. diff --git a/src/config.h b/src/config.h index 00e95f6..3c31d21 100644 --- a/src/config.h +++ b/src/config.h @@ -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. diff --git a/src/config_libconfig.c b/src/config_libconfig.c index 829b1ee..dae94b7 100644 --- a/src/config_libconfig.c +++ b/src/config_libconfig.c @@ -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."); diff --git a/src/opengl.c b/src/opengl.c index 00b9f5a..6561280 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -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 } diff --git a/src/options.c b/src/options.c index 12ef712..d570f94 100644 --- a/src/options.c +++ b/src/options.c @@ -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) {