Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reminder to free RID's in compute shader tutorial #10740

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tutorials/shaders/compute_shaders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@ the data and print the results to our console.
GD.Print("Input: ", string.Join(", ", input));
GD.Print("Output: ", string.Join(", ", output));

Freeing memory
------------------

The ``buffer``, ``pipeline``, and ``uniform_set`` variables we've been using are
each an :ref:`class_RID`. Because RenderingDevice is meant to be a lower-level
API, RIDs aren't freed automatically. This means that once you're done using
``buffer`` or any other RID, you are responsible for freeing its memory
manually using the RenderingDevice's
:ref:`free_rid()<class_RenderingDevice_method_free_rid>` method.

With that, you have everything you need to get started working with compute
shaders.

Expand Down