I am getting the following error:
[101 21:40:02.433905] Unknown uniform in cursor program
If I comment out that fatal error and the check for leftover uniforms, I get:
[101 21:44:40.638541] Unknown uniform in borders program: _main_pos_map_0[0]
Commenting out that fatal error and check for leftover uniforms makes kitty work correctly, as far as I can tell.
$ python . --debug-config
python3 setup.py
CC: gcc (7, 3)
kitty 0.8.4 (cc910f6b79) created by Kovid Goyal
Linux karl-home-desktop 4.15.15-1-ARCH #1 SMP PREEMPT Sat Mar 31 23:59:25 UTC 2018 x86_64
Running under: X11
Arch Linux \r (\l)
LSB_VERSION=1.4
DISTRIB_ID=Arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"
Loaded config files: /home/karl/.config/kitty/kitty.conf
Config options different from defaults:
background_opacity 0.8
font_family Inconsolata
font_size 14.0
inactive_text_alpha 0.8
libGL is from the nvidia-340xx-utils package, which seems to be the main difference from my computer at work which works fine.
That's a broken GL driver. Not much I can do about it. You can make it work by ignoring the sanity checks, but that just means other random things might break later on.
To elaborate, the GL driver is incorrectly treating const variables in the shaders as uniforms.
You are basically cutting out all the pre-gtx nvidia card owners from using your program. Not a smart move, imho. Maybe you should use older GLSL specifications in your shaders or provide a workaround.
I'm widely known for my extreme stupidity.
Here is a patch that _ignores_ that error, everything seems to work okay with Nvidia 440xx so far.
shaders.c 2020-05-09 15:18:21.000000000 +1000
--- shaders.c 2020-05-18 15:18:09.424911404 +1000
*************** init_borders_program(void) {
*** 666,672 ****
else if SET_LOC(active_border_color);
else if SET_LOC(inactive_border_color);
else if SET_LOC(bell_border_color);
! else { fatal("Unknown uniform in borders program: %s", p->uniforms[i].name); return; }
}
if (left) { fatal("Left over uniforms in borders program"); return; }
#undef SET_LOC
--- 666,676 ----
else if SET_LOC(active_border_color);
else if SET_LOC(inactive_border_color);
else if SET_LOC(bell_border_color);
! else if (strcmp(p->uniforms[i].name, "_main_pos_map_0[0]") == 0){
! left++;
! log_error("ignoring unexpected uniform %i -> _main_pos_map_0[0]", i);
! }
! else { fatal("Unknown uniform in borders program: %s, %i", p->uniforms[i].name, i); return; }
}
if (left) { fatal("Left over uniforms in borders program"); return; }
#undef SET_LOC
That will break when kitty tries to draw borders around a window.
How can I trigger drawing of borders? I am using i3, so that might be why I don't see it?
i tried new_window and new_os_window and it draws borders fine. :thinking:
Use a layout other than stack and have multipe kitty windows in a single
OS window.
Created multiple new_window inside a single OS window, changed layout in various ways, cycling with next_layout, everything seems okay.
For clarity, here is a git diff instead of a diff-patch:
diff --git a/kitty/shaders.c b/kitty/shaders.c
index 342c2d8d..0933c06b 100644
--- a/kitty/shaders.c
+++ b/kitty/shaders.c
@@ -666,7 +666,11 @@ init_borders_program(void) {
else if SET_LOC(active_border_color);
else if SET_LOC(inactive_border_color);
else if SET_LOC(bell_border_color);
- else { fatal("Unknown uniform in borders program: %s", p->uniforms[i].name); return; }
+ else if (strcmp(p->uniforms[i].name, "_main_pos_map_0[0]") == 0){
+ left++;
+ log_error("ignoring unexpected uniform %i -> _main_pos_map_0[0]", i);
+ }
+ else { fatal("Unknown uniform in borders program: %s, %i", p->uniforms[i].name, i); return; }
}
if (left) { fatal("Left over uniforms in borders program"); return; }
#undef SET_LOC
Legend!
Most helpful comment
I'm widely known for my extreme stupidity.