From 94f0f8cc80108efd892ebf33ae447d50af71ec18 Mon Sep 17 00:00:00 2001 From: marc0246 <40955683+marc0246@users.noreply.github.com> Date: Wed, 25 Oct 2023 11:01:30 +0200 Subject: [PATCH] #2369 fixes (#2371) --- examples/src/bin/deferred/main.rs | 9 +++++++-- examples/src/bin/interactive_fractal/app.rs | 16 ++++++++++++---- .../src/bin/multi_window_game_of_life/app.rs | 13 ++++++++++--- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/examples/src/bin/deferred/main.rs b/examples/src/bin/deferred/main.rs index 11f8b356c8..23175dddad 100644 --- a/examples/src/bin/deferred/main.rs +++ b/examples/src/bin/deferred/main.rs @@ -32,7 +32,9 @@ use crate::{ use cgmath::{Matrix4, SquareMatrix, Vector3}; use std::sync::Arc; use vulkano::{ - command_buffer::allocator::StandardCommandBufferAllocator, + command_buffer::allocator::{ + StandardCommandBufferAllocator, StandardCommandBufferAllocatorCreateInfo, + }, device::{ physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, QueueCreateInfo, QueueFlags, @@ -161,7 +163,10 @@ fn main() { let memory_allocator = Arc::new(StandardMemoryAllocator::new_default(device.clone())); let command_buffer_allocator = Arc::new(StandardCommandBufferAllocator::new( device.clone(), - Default::default(), + StandardCommandBufferAllocatorCreateInfo { + secondary_buffer_count: 32, + ..Default::default() + }, )); // Here is the basic initialization for the deferred system. diff --git a/examples/src/bin/interactive_fractal/app.rs b/examples/src/bin/interactive_fractal/app.rs index fa188322ab..e8095cf7eb 100644 --- a/examples/src/bin/interactive_fractal/app.rs +++ b/examples/src/bin/interactive_fractal/app.rs @@ -13,9 +13,14 @@ use crate::{ use cgmath::Vector2; use std::{sync::Arc, time::Instant}; use vulkano::{ - command_buffer::allocator::StandardCommandBufferAllocator, - descriptor_set::allocator::StandardDescriptorSetAllocator, device::Queue, - image::view::ImageView, memory::allocator::StandardMemoryAllocator, sync::GpuFuture, + command_buffer::allocator::{ + StandardCommandBufferAllocator, StandardCommandBufferAllocatorCreateInfo, + }, + descriptor_set::allocator::StandardDescriptorSetAllocator, + device::Queue, + image::view::ImageView, + memory::allocator::StandardMemoryAllocator, + sync::GpuFuture, }; use vulkano_util::{renderer::VulkanoWindowRenderer, window::WindowDescriptor}; use winit::{ @@ -66,7 +71,10 @@ impl FractalApp { )); let command_buffer_allocator = Arc::new(StandardCommandBufferAllocator::new( gfx_queue.device().clone(), - Default::default(), + StandardCommandBufferAllocatorCreateInfo { + secondary_buffer_count: 32, + ..Default::default() + }, )); let descriptor_set_allocator = Arc::new(StandardDescriptorSetAllocator::new( gfx_queue.device().clone(), diff --git a/examples/src/bin/multi_window_game_of_life/app.rs b/examples/src/bin/multi_window_game_of_life/app.rs index aa0c774920..38f3a2c19f 100644 --- a/examples/src/bin/multi_window_game_of_life/app.rs +++ b/examples/src/bin/multi_window_game_of_life/app.rs @@ -13,8 +13,12 @@ use crate::{ }; use std::{collections::HashMap, sync::Arc}; use vulkano::{ - command_buffer::allocator::StandardCommandBufferAllocator, - descriptor_set::allocator::StandardDescriptorSetAllocator, device::Queue, format::Format, + command_buffer::allocator::{ + StandardCommandBufferAllocator, StandardCommandBufferAllocatorCreateInfo, + }, + descriptor_set::allocator::StandardDescriptorSetAllocator, + device::Queue, + format::Format, }; use vulkano_util::{ context::{VulkanoConfig, VulkanoContext}, @@ -113,7 +117,10 @@ impl Default for App { let context = VulkanoContext::new(VulkanoConfig::default()); let command_buffer_allocator = Arc::new(StandardCommandBufferAllocator::new( context.device().clone(), - Default::default(), + StandardCommandBufferAllocatorCreateInfo { + secondary_buffer_count: 32, + ..Default::default() + }, )); let descriptor_set_allocator = Arc::new(StandardDescriptorSetAllocator::new( context.device().clone(),