Skip to content

Commit

Permalink
clippy: Fix doc_lazy_continuation lints (gfx-rs#5935)
Browse files Browse the repository at this point in the history
These are in nightly builds.
  • Loading branch information
waywardmonkeys authored Jul 11, 2024
1 parent b5c33fc commit ee16de1
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 21 deletions.
6 changes: 3 additions & 3 deletions examples/src/uniform_values/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//! 4. the bind group layout is attached to the pipeline layout.
//! 5. the uniform buffer and the bind group are stored alongside the pipeline.
//! 6. an instance of `AppState` is created. This variable will be modified
//! to change parameters in the shader and modified by app events to preform and save
//! those changes.
//! to change parameters in the shader and modified by app events to preform and save
//! those changes.
//! 7. (7a and 7b) the `state` variable created at (6) is modified by commands such
//! as pressing the arrow keys or zooming in or out.
//! as pressing the arrow keys or zooming in or out.
//! 8. the contents of the `AppState` are loaded into the uniform buffer in preparation.
//! 9. the bind group with the uniform buffer is attached to the render pass.
//!
Expand Down
2 changes: 1 addition & 1 deletion naga/src/front/glsl/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ impl<'a> Context<'a> {
/// # Panics
///
/// - If more than one [`StmtContext`] are active at the same time or if the
/// previous call didn't use it in lowering.
/// previous call didn't use it in lowering.
#[must_use]
pub fn stmt_ctx(&mut self) -> StmtContext {
self.stmt_ctx.take().unwrap()
Expand Down
13 changes: 6 additions & 7 deletions naga/src/valid/analyzer.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/*! Module analyzer.
Figures out the following properties:
- control flow uniformity
- texture/sampler pairs
- expression reference counts
!*/
//! Module analyzer.
//!
//! Figures out the following properties:
//! - control flow uniformity
//! - texture/sampler pairs
//! - expression reference counts
use super::{ExpressionError, FunctionError, ModuleInfo, ShaderStages, ValidationFlags};
use crate::span::{AddSpan as _, WithSpan};
Expand Down
6 changes: 3 additions & 3 deletions naga/src/valid/handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ impl super::Validator {
/// Validates that all handles within `module` are:
///
/// * Valid, in the sense that they contain indices within each arena structure inside the
/// [`crate::Module`] type.
/// [`crate::Module`] type.
/// * No arena contents contain any items that have forward dependencies; that is, the value
/// associated with a handle only may contain references to handles in the same arena that
/// were constructed before it.
/// associated with a handle only may contain references to handles in the same arena that
/// were constructed before it.
///
/// By validating the above conditions, we free up subsequent logic to assume that handle
/// accesses are infallible.
Expand Down
1 change: 1 addition & 0 deletions wgpu-core/src/track/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ unsafe fn insert_or_merge<A: HalApi>(
/// - Uses the `start_state_provider` to populate `start_states`
/// - Uses either `end_state_provider` or `start_state_provider`
/// to populate `current_states`.
///
/// If the resource is tracked
/// - Inserts barriers from the state in `current_states`
/// to the state provided by `start_state_provider`.
Expand Down
1 change: 1 addition & 0 deletions wgpu-core/src/track/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl TrackerIndex {
/// - IDs of dead handles can be recycled while resources are internally held alive (and tracked).
/// - The plan is to remove IDs in the long run
/// ([#5121](https://github.com/gfx-rs/wgpu/issues/5121)).
///
/// In order to produce these tracker indices, there is a shared TrackerIndexAllocator
/// per resource type. Indices have the same lifetime as the internal resource they
/// are associated to (alloc happens when creating the resource and free is called when
Expand Down
1 change: 1 addition & 0 deletions wgpu-core/src/track/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ unsafe fn insert_or_merge<A: HalApi>(
/// - Uses the `start_state_provider` to populate `start_states`
/// - Uses either `end_state_provider` or `start_state_provider`
/// to populate `current_states`.
///
/// If the resource is tracked
/// - Inserts barriers from the state in `current_states`
/// to the state provided by `start_state_provider`.
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,7 @@ pub struct BuildAccelerationStructureDescriptor<'a, A: Api> {
/// - All buffers, buffer addresses and offsets will be ignored.
/// - The build mode will be ignored.
/// - Reducing the amount of Instances, Triangle groups or AABB groups (or the number of Triangles/AABBs in corresponding groups),
/// may result in reduced size requirements.
/// may result in reduced size requirements.
/// - Any other change may result in a bigger or smaller size requirement.
#[derive(Clone, Debug)]
pub struct GetAccelerationStructureBuildSizesDescriptor<'a, A: Api> {
Expand Down
12 changes: 6 additions & 6 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5446,13 +5446,13 @@ pub struct SurfaceConfiguration<V> {
///
/// Typical values range from 3 to 1, but higher values are possible:
/// * Choose 2 or higher for potentially smoother frame display, as it allows to be at least one frame
/// to be queued up. This typically avoids starving the GPU's work queue.
/// Higher values are useful for achieving a constant flow of frames to the display under varying load.
/// to be queued up. This typically avoids starving the GPU's work queue.
/// Higher values are useful for achieving a constant flow of frames to the display under varying load.
/// * Choose 1 for low latency from frame recording to frame display.
/// ⚠️ If the backend does not support waiting on present, this will cause the CPU to wait for the GPU
/// to finish all work related to the previous frame when calling `wgpu::Surface::get_current_texture`,
/// causing CPU-GPU serialization (i.e. when `wgpu::Surface::get_current_texture` returns, the GPU might be idle).
/// It is currently not possible to query this. See <https://github.com/gfx-rs/wgpu/issues/2869>.
/// ⚠️ If the backend does not support waiting on present, this will cause the CPU to wait for the GPU
/// to finish all work related to the previous frame when calling `wgpu::Surface::get_current_texture`,
/// causing CPU-GPU serialization (i.e. when `wgpu::Surface::get_current_texture` returns, the GPU might be idle).
/// It is currently not possible to query this. See <https://github.com/gfx-rs/wgpu/issues/2869>.
/// * A value of 0 is generally not supported and always clamped to a higher value.
pub desired_maximum_frame_latency: u32,
/// Specifies how the alpha channel of the textures should be handled during compositing.
Expand Down

0 comments on commit ee16de1

Please sign in to comment.