Skip to content

Manual array/buffer synchronization #73

Description

@Redninja106

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);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions