Skip to content

Commit

Permalink
Remove unneccessary muts left after vulkano-rs#1957
Browse files Browse the repository at this point in the history
  • Loading branch information
marc0246 committed Oct 7, 2022
1 parent f99c679 commit 7daa28a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/src/bin/interactive_fractal/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Usage:
}

/// Run our compute pipeline and return a future of when the compute is finished
pub fn compute(&mut self, image_target: DeviceImageView) -> Box<dyn GpuFuture> {
pub fn compute(&self, image_target: DeviceImageView) -> Box<dyn GpuFuture> {
self.fractal_pipeline.compute(
image_target,
self.c,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl PixelsDrawPipeline {

/// Draw input `image` over a quad of size -1.0 to 1.0
pub fn draw(
&mut self,
&self,
viewport_dimensions: [u32; 2],
image: Arc<dyn ImageViewAbstract>,
) -> SecondaryAutoCommandBuffer {
Expand Down
2 changes: 1 addition & 1 deletion examples/src/bin/interactive_fractal/place_over_frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl RenderPassPlaceOverFrame {
/// Place view exactly over swapchain image target.
/// Texture draw pipeline uses a quad onto which it places the view.
pub fn render<F>(
&mut self,
&self,
before_future: F,
view: DeviceImageView,
target: SwapchainImageView,
Expand Down
10 changes: 5 additions & 5 deletions examples/src/bin/shader-types-sharing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ fn main() {
data_buffer: Arc<CpuAccessibleBuffer<[u32]>>,
parameters: shaders::ty::Parameters,
command_buffer_allocator: &StandardCommandBufferAllocator,
descriptor_set_allocator: &mut StandardDescriptorSetAllocator,
descriptor_set_allocator: &StandardDescriptorSetAllocator,
) {
let layout = pipeline.layout().set_layouts().get(0).unwrap();
let set = PersistentDescriptorSet::new(
Expand Down Expand Up @@ -238,7 +238,7 @@ fn main() {
}

let command_buffer_allocator = StandardCommandBufferAllocator::new(device.clone());
let mut descriptor_set_allocator = StandardDescriptorSetAllocator::new(device.clone());
let descriptor_set_allocator = StandardDescriptorSetAllocator::new(device.clone());

// Preparing test data array `[0, 1, 2, 3....]`
let data_buffer = {
Expand Down Expand Up @@ -288,7 +288,7 @@ fn main() {
data_buffer.clone(),
shaders::ty::Parameters { value: 2 },
&command_buffer_allocator,
&mut descriptor_set_allocator,
&descriptor_set_allocator,
);

// Then add 1 to each value
Expand All @@ -298,7 +298,7 @@ fn main() {
data_buffer.clone(),
shaders::ty::Parameters { value: 1 },
&command_buffer_allocator,
&mut descriptor_set_allocator,
&descriptor_set_allocator,
);

// Then multiply each value by 3
Expand All @@ -308,7 +308,7 @@ fn main() {
data_buffer.clone(),
shaders::ty::Parameters { value: 3 },
&command_buffer_allocator,
&mut descriptor_set_allocator,
&descriptor_set_allocator,
);

let data_buffer_content = data_buffer.read().unwrap();
Expand Down

0 comments on commit 7daa28a

Please sign in to comment.