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

Manual array/buffer synchronization #73

Open
Redninja106 opened this issue Oct 6, 2024 · 0 comments
Open

Manual array/buffer synchronization #73

Redninja106 opened this issue Oct 6, 2024 · 0 comments
Labels
feature New feature or request
Milestone

Comments

@Redninja106
Copy link
Owner

Redninja106 commented Oct 6, 2024

Right now when using arrays (buffers) in shaders, arrays are automatically synced before each shader invocation. this can lead to a lot of unnecessary copying, but is required to prevent desyncs. SF should offer an opt-in solution for manual array-buffer syncing:

class Graphics 
{
      // sends the current buffer data to the gpu, any changes after a call to this method will *not* be reflected in shaders (unless the method is called again)
      public static void BufferUpload(Array array);
      // retrieves the array data from the gpu (only useful in compute shaders)
      public static void BufferSync(Array array);
}
@Redninja106 Redninja106 added the feature New feature or request label Oct 6, 2024
@Redninja106 Redninja106 added this to the 0.3.0 milestone Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant