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:
parent
c5d9f459dd
commit
710ff2fd42
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.");
|
||||
|
|
12
src/opengl.c
12
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
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue