-
Notifications
You must be signed in to change notification settings - Fork 7
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
Simplified Kernel
creation and reuse
#4
Conversation
+ Added `Shader` struct (wrapper over wgpu::ShaderModule). + Added `Program` struct (Shader + entry point + bindings). It represents a function in a `Shader`. * `Kernel` is created from a `Program`. It is the execution of it. * `DescriptorSet` derives `Clone`. * Updated all examples to new setup. - Removed `KernelBuilder`: it added complexity. - Removed `utils::shaders` module. Functionality is now on `Shader`. -----TODO----- % `webcam` example does not work. Device lost 🚩 % Update and check documentation. Update README as well.
It seems the NVIDIA driver for WSL2 CUDA enablement is making |
src/kernel.rs
Outdated
impl<'fw, 'res, 'sha> KernelBuilder<'fw, 'res, 'sha> { | ||
/// Adds a [`DescriptorSet`] into the [`KernelBuilder`] internal layout. | ||
impl Shader { | ||
/// Creates a [`wgpu::ShaderModule`] instance from a SPIR-V file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix doc
src/kernel.rs
Outdated
} | ||
} | ||
|
||
/// Adds a [`DescriptorSet`] for this [`Program`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
src/kernel.rs
Outdated
} | ||
|
||
impl<'fw> Kernel<'fw> { | ||
/// Creates a [`KernelBuilder`] from a [`Program`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this entire bit of documentation
Shader
struct (wrapper over wgpu::ShaderModule).Program
struct (Shader + entry point + bindings). It representsa function in a
Shader
.Kernel
is created from aProgram
. It is the execution of it.DescriptorSet
derivesClone
.KernelBuilder
: it added complexity.utils::shaders
module. Functionality is now onShader
.-----TODO-----
%
webcam
example does not work. Device lost 🚩% Update and check documentation. Update README as well.