rollback vulkano
This commit is contained in:
@@ -44,8 +44,8 @@ use vulkano::{
|
||||
allocator::StandardDescriptorSetAllocator, DescriptorSet, WriteDescriptorSet,
|
||||
},
|
||||
device::{
|
||||
physical::PhysicalDevice, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
|
||||
Queue, QueueCreateInfo, QueueFlags,
|
||||
physical::PhysicalDevice, Device, DeviceCreateInfo, DeviceExtensions, Features, Queue,
|
||||
QueueCreateInfo, QueueFlags,
|
||||
},
|
||||
format::Format,
|
||||
image::{
|
||||
@@ -195,7 +195,7 @@ impl WlxGraphics {
|
||||
let target_version = vulkano::Version::V1_3;
|
||||
let library = get_vulkan_library();
|
||||
|
||||
let vk_app_info_raw = vk::ApplicationInfo::default()
|
||||
let vk_app_info_raw = vk::ApplicationInfo::builder()
|
||||
.application_version(0)
|
||||
.engine_version(0)
|
||||
.api_version(vk_target_version);
|
||||
@@ -205,7 +205,7 @@ impl WlxGraphics {
|
||||
.create_vulkan_instance(
|
||||
system,
|
||||
get_instance_proc_addr,
|
||||
&vk::InstanceCreateInfo::default()
|
||||
&vk::InstanceCreateInfo::builder()
|
||||
.application_info(&vk_app_info_raw)
|
||||
.enabled_extension_names(&instance_extensions_raw)
|
||||
as *const _ as *const _,
|
||||
@@ -286,23 +286,25 @@ impl WlxGraphics {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let features = DeviceFeatures {
|
||||
let features = Features {
|
||||
dynamic_rendering: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let queue_priorities = [1.0];
|
||||
|
||||
let queue_create_infos = [vk::DeviceQueueCreateInfo::default()
|
||||
let queue_create_infos = [vk::DeviceQueueCreateInfo::builder()
|
||||
.queue_family_index(queue_family_index)
|
||||
.queue_priorities(&queue_priorities)];
|
||||
.queue_priorities(&queue_priorities)
|
||||
.build()];
|
||||
|
||||
let mut device_create_info = vk::DeviceCreateInfo::default()
|
||||
let mut device_create_info = vk::DeviceCreateInfo::builder()
|
||||
.queue_create_infos(&queue_create_infos)
|
||||
.enabled_extension_names(&device_extensions_raw);
|
||||
.enabled_extension_names(&device_extensions_raw)
|
||||
.build();
|
||||
|
||||
let mut dynamic_rendering =
|
||||
PhysicalDeviceDynamicRenderingFeatures::default().dynamic_rendering(true);
|
||||
PhysicalDeviceDynamicRenderingFeatures::builder().dynamic_rendering(true);
|
||||
|
||||
dynamic_rendering.p_next = device_create_info.p_next as _;
|
||||
device_create_info.p_next = (&mut dynamic_rendering) as *const _ as *const c_void;
|
||||
@@ -487,9 +489,9 @@ impl WlxGraphics {
|
||||
physical_device,
|
||||
DeviceCreateInfo {
|
||||
enabled_extensions: my_extensions,
|
||||
enabled_features: DeviceFeatures {
|
||||
enabled_features: Features {
|
||||
dynamic_rendering: true,
|
||||
..DeviceFeatures::empty()
|
||||
..Features::empty()
|
||||
},
|
||||
queue_create_infos: vec![QueueCreateInfo {
|
||||
queue_family_index,
|
||||
@@ -625,9 +627,9 @@ impl WlxGraphics {
|
||||
physical_device,
|
||||
DeviceCreateInfo {
|
||||
enabled_extensions: my_extensions,
|
||||
enabled_features: DeviceFeatures {
|
||||
enabled_features: Features {
|
||||
dynamic_rendering: true,
|
||||
..DeviceFeatures::empty()
|
||||
..Features::empty()
|
||||
},
|
||||
queue_create_infos: vec![QueueCreateInfo {
|
||||
queue_family_index,
|
||||
@@ -1034,7 +1036,10 @@ impl WlxGraphics {
|
||||
(fns.v1_0.queue_submit)(
|
||||
self.queue.handle(),
|
||||
1,
|
||||
[SubmitInfo::default().command_buffers(&[command_buffer.handle()])].as_ptr(),
|
||||
[SubmitInfo::builder()
|
||||
.command_buffers(&[command_buffer.handle()])
|
||||
.build()]
|
||||
.as_ptr(),
|
||||
fence.handle(),
|
||||
)
|
||||
}
|
||||
@@ -1186,7 +1191,7 @@ impl WlxPipeline<WlxPipelineDynamic> {
|
||||
let vep = vert.entry_point("main").unwrap(); // want panic
|
||||
let fep = frag.entry_point("main").unwrap(); // want panic
|
||||
|
||||
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep)?;
|
||||
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep.info().input_interface)?;
|
||||
|
||||
let stages = smallvec![
|
||||
vulkano::pipeline::PipelineShaderStageCreateInfo::new(vep),
|
||||
@@ -1343,7 +1348,7 @@ impl WlxPipeline<WlxPipelineLegacy> {
|
||||
let vep = vert.entry_point("main").unwrap(); // want panic
|
||||
let fep = frag.entry_point("main").unwrap(); // want panic
|
||||
|
||||
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep)?;
|
||||
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep.info().input_interface)?;
|
||||
|
||||
let stages = smallvec![
|
||||
vulkano::pipeline::PipelineShaderStageCreateInfo::new(vep),
|
||||
|
||||
Reference in New Issue
Block a user