This commit is contained in:
marc0246 2023-10-25 11:01:30 +02:00 committed by GitHub
parent 918c4f5016
commit 94f0f8cc80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 9 deletions

View File

@ -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.

View File

@ -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(),

View File

@ -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(),