Skip to content

Commit

Permalink
Fix documentation claiming shader entry points must return void (gfx-…
Browse files Browse the repository at this point in the history
  • Loading branch information
e00E authored Jul 26, 2022
1 parent 7551983 commit 271bb86
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions wgpu-core/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ impl CreateShaderModuleError {
pub struct ProgrammableStageDescriptor<'a> {
/// The compiled shader module for this stage.
pub module: ShaderModuleId,
/// The name of the entry point in the compiled shader. There must be a function that returns
/// void with this name in the shader.
/// The name of the entry point in the compiled shader. There must be a function with this name
/// in the shader.
pub entry_point: Cow<'a, str>,
}

Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,8 @@ pub struct ShaderModuleDescriptor<'a> {
pub struct ProgrammableStage<'a, A: Api> {
/// The compiled shader module for this stage.
pub module: &'a A::ShaderModule,
/// The name of the entry point in the compiled shader. There must be a function that returns
/// void with this name in the shader.
/// The name of the entry point in the compiled shader. There must be a function with this name
/// in the shader.
pub entry_point: &'a str,
}

Expand Down
12 changes: 6 additions & 6 deletions wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1468,8 +1468,8 @@ pub struct VertexBufferLayout<'a> {
pub struct VertexState<'a> {
/// The compiled shader module for this stage.
pub module: &'a ShaderModule,
/// The name of the entry point in the compiled shader. There must be a function that returns
/// void with this name in the shader.
/// The name of the entry point in the compiled shader. There must be a function with this name
/// in the shader.
pub entry_point: &'a str,
/// The format of any vertex buffers used with this pipeline.
pub buffers: &'a [VertexBufferLayout<'a>],
Expand All @@ -1485,8 +1485,8 @@ pub struct VertexState<'a> {
pub struct FragmentState<'a> {
/// The compiled shader module for this stage.
pub module: &'a ShaderModule,
/// The name of the entry point in the compiled shader. There must be a function that returns
/// void with this name in the shader.
/// The name of the entry point in the compiled shader. There must be a function with this name
/// in the shader.
pub entry_point: &'a str,
/// The color state of the render targets.
pub targets: &'a [Option<ColorTargetState>],
Expand Down Expand Up @@ -1545,8 +1545,8 @@ pub struct ComputePipelineDescriptor<'a> {
pub layout: Option<&'a PipelineLayout>,
/// The compiled shader module for this stage.
pub module: &'a ShaderModule,
/// The name of the entry point in the compiled shader. There must be a function that returns
/// void with this name in the shader.
/// The name of the entry point in the compiled shader. There must be a function with this name
/// and no return value in the shader.
pub entry_point: &'a str,
}

Expand Down

0 comments on commit 271bb86

Please sign in to comment.