From a87fded4cff008113dfc037e43e6acfd73cfa73d Mon Sep 17 00:00:00 2001 From: Raymond DiDonato Date: Mon, 16 Sep 2024 19:36:20 -0400 Subject: [PATCH] Fix VRAM leak in compositor effect demo (#1115) --- compute/post_shader/post_process_grayscale.gd | 2 +- compute/post_shader/post_process_shader.gd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compute/post_shader/post_process_grayscale.gd b/compute/post_shader/post_process_grayscale.gd index f3189d0b33..fcd877362f 100644 --- a/compute/post_shader/post_process_grayscale.gd +++ b/compute/post_shader/post_process_grayscale.gd @@ -19,7 +19,7 @@ func _notification(what: int) -> void: if what == NOTIFICATION_PREDELETE: if shader.is_valid(): # Freeing our shader will also free any dependents such as the pipeline! - RenderingServer.free_rid(shader) + rd.free_rid(shader) #region Code in this region runs on the rendering thread. diff --git a/compute/post_shader/post_process_shader.gd b/compute/post_shader/post_process_shader.gd index be6396382e..b772a8e6f3 100644 --- a/compute/post_shader/post_process_shader.gd +++ b/compute/post_shader/post_process_shader.gd @@ -58,7 +58,7 @@ func _notification(what: int) -> void: if what == NOTIFICATION_PREDELETE: if shader.is_valid(): # Freeing our shader will also free any dependents such as the pipeline! - RenderingServer.free_rid(shader) + rd.free_rid(shader) #region Code in this region runs on the rendering thread.