From c9542275e825bdbe111b8a0d72dfcaf5f917bafe Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 14 Jul 2021 23:16:57 +0200 Subject: [PATCH] Updated README file with partial struct note Also updated the GitHub sponsors list --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 09c29d86..0abdb9bc 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ using ReadWriteBuffer buffer = Gpu.Default.AllocateReadWriteBuffer(array); The `AllocateReadWriteBuffer` extension takes care of creating a `ReadWriteBuffer` instance with the same size as the input array and copying its contents to the allocated GPU buffer. There are a number of overloads available as well, to create buffers of different types and with custom length. -Next, we need to define the GPU shader to run. To do this, we'll need to define a `struct` type implementing the `IComputeShader` interface. This type will contain the code we want to run on the GPU, as well as fields representing the values we want to capture and pass to the GPU (such as GPU resources, or arbitrary values we need). In this case, we only need to capture the buffer to work on, so the shader type will look like this: +Next, we need to define the GPU shader to run. To do this, we'll need to define a `partial struct` type implementing the `IComputeShader` interface (note that the `partial` modifier is necessary for **ComputeSharp** to generate additional code to run the shader). This type will contain the code we want to run on the GPU, as well as fields representing the values we want to capture and pass to the GPU (such as GPU resources, or arbitrary values we need). In this case, we only need to capture the buffer to work on, so the shader type will look like this: ```C# [AutoConstructor] @@ -352,9 +352,11 @@ For a complete example, check out the F# sample [here](https://github.com/Sergio Huge thanks to these sponsors for directly supporting my work on **ComputeSharp**, it means a lot! 🙌 - - - + + + + + # Special thanks