mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-07-11 18:23:20 +00:00
Free global VAO on terminate
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
This commit is contained in:
parent
e9ca3a5d82
commit
28dc76fcf6
3 changed files with 10 additions and 0 deletions
|
|
@ -2133,6 +2133,7 @@ glfw_init(PyObject UNUSED *self, PyObject *args) {
|
|||
|
||||
static PyObject*
|
||||
glfw_terminate(PYNOARG) {
|
||||
cleanup_shader_resources_on_terminate();
|
||||
for (size_t i = 0; i < arraysz(cursors); i++) {
|
||||
if (cursors[i].is_custom && cursors[i].glfw) {
|
||||
glfwDestroyCursor(cursors[i].glfw);
|
||||
|
|
|
|||
|
|
@ -1867,6 +1867,14 @@ free_vao(ssize_t vao_idx) {
|
|||
remove_vao(vao_idx);
|
||||
}
|
||||
|
||||
void
|
||||
cleanup_shader_resources_on_terminate(void) {
|
||||
if (shader_globals_vao_idx != -1) {
|
||||
remove_vao(shader_globals_vao_idx);
|
||||
shader_globals_vao_idx = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
finalize(void) {
|
||||
default_visual_bell_animation = free_animation(default_visual_bell_animation);
|
||||
|
|
|
|||
|
|
@ -555,6 +555,7 @@ sprite_index_to_pos(unsigned idx, unsigned xnum, unsigned ynum, unsigned *x, uns
|
|||
|
||||
void initialize_gpu(void);
|
||||
void free_vao(ssize_t vao_idx);
|
||||
void cleanup_shader_resources_on_terminate(void);
|
||||
bool remove_os_window(id_type os_window_id);
|
||||
void* make_os_window_context_current(OSWindow *w);
|
||||
void set_os_window_size(OSWindow *os_window, int x, int y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue