mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 14:56:42 +00:00
parent
9f0fd9df63
commit
3c6c1c909f
@ -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,
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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(
|
||||
@ -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 = {
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user