Skip to content

Commit 271bb86

Browse files
authored
Fix documentation claiming shader entry points must return void (#2911)
1 parent 7551983 commit 271bb86

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

wgpu-core/src/pipeline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ impl CreateShaderModuleError {
151151
pub struct ProgrammableStageDescriptor<'a> {
152152
/// The compiled shader module for this stage.
153153
pub module: ShaderModuleId,
154-
/// The name of the entry point in the compiled shader. There must be a function that returns
155-
/// void with this name in the shader.
154+
/// The name of the entry point in the compiled shader. There must be a function with this name
155+
/// in the shader.
156156
pub entry_point: Cow<'a, str>,
157157
}
158158

wgpu-hal/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,8 @@ pub struct ShaderModuleDescriptor<'a> {
969969
pub struct ProgrammableStage<'a, A: Api> {
970970
/// The compiled shader module for this stage.
971971
pub module: &'a A::ShaderModule,
972-
/// The name of the entry point in the compiled shader. There must be a function that returns
973-
/// void with this name in the shader.
972+
/// The name of the entry point in the compiled shader. There must be a function with this name
973+
/// in the shader.
974974
pub entry_point: &'a str,
975975
}
976976

wgpu/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,8 +1468,8 @@ pub struct VertexBufferLayout<'a> {
14681468
pub struct VertexState<'a> {
14691469
/// The compiled shader module for this stage.
14701470
pub module: &'a ShaderModule,
1471-
/// The name of the entry point in the compiled shader. There must be a function that returns
1472-
/// void with this name in the shader.
1471+
/// The name of the entry point in the compiled shader. There must be a function with this name
1472+
/// in the shader.
14731473
pub entry_point: &'a str,
14741474
/// The format of any vertex buffers used with this pipeline.
14751475
pub buffers: &'a [VertexBufferLayout<'a>],
@@ -1485,8 +1485,8 @@ pub struct VertexState<'a> {
14851485
pub struct FragmentState<'a> {
14861486
/// The compiled shader module for this stage.
14871487
pub module: &'a ShaderModule,
1488-
/// The name of the entry point in the compiled shader. There must be a function that returns
1489-
/// void with this name in the shader.
1488+
/// The name of the entry point in the compiled shader. There must be a function with this name
1489+
/// in the shader.
14901490
pub entry_point: &'a str,
14911491
/// The color state of the render targets.
14921492
pub targets: &'a [Option<ColorTargetState>],
@@ -1545,8 +1545,8 @@ pub struct ComputePipelineDescriptor<'a> {
15451545
pub layout: Option<&'a PipelineLayout>,
15461546
/// The compiled shader module for this stage.
15471547
pub module: &'a ShaderModule,
1548-
/// The name of the entry point in the compiled shader. There must be a function that returns
1549-
/// void with this name in the shader.
1548+
/// The name of the entry point in the compiled shader. There must be a function with this name
1549+
/// and no return value in the shader.
15501550
pub entry_point: &'a str,
15511551
}
15521552

0 commit comments

Comments
 (0)