Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove command_buffer::submit module, make new Queue methods public #2002

Merged
merged 1 commit into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions examples/src/bin/gl-interop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ mod linux {
use vulkano::{
buffer::{BufferUsage, CpuAccessibleBuffer, TypedBufferAccess},
command_buffer::{
submit::SubmitCommandBufferBuilder, AutoCommandBufferBuilder, CommandBufferUsage,
RenderPassBeginInfo, SubpassContents,
AutoCommandBufferBuilder, CommandBufferUsage, RenderPassBeginInfo, SemaphoreSubmitInfo,
SubmitInfo, SubpassContents,
},
descriptor_set::{PersistentDescriptorSet, WriteDescriptorSet},
device::{
Expand Down Expand Up @@ -49,7 +49,7 @@ mod linux {
},
sync::{
now, ExternalSemaphoreHandleType, ExternalSemaphoreHandleTypes, FlushError, GpuFuture,
PipelineStages, Semaphore, SemaphoreCreateInfo,
Semaphore, SemaphoreCreateInfo,
},
VulkanLibrary,
};
Expand Down Expand Up @@ -255,24 +255,36 @@ mod linux {
}
Event::RedrawEventsCleared => {
unsafe {
let mut builder = SubmitCommandBufferBuilder::new();
builder.add_signal_semaphore(acquire_sem.clone());
builder.submit(&queue).unwrap();
let mut queue_guard = queue.lock();
queue_guard
.submit_unchecked(
[SubmitInfo {
signal_semaphores: vec![SemaphoreSubmitInfo::semaphore(
acquire_sem.clone(),
)],
..Default::default()
}],
None,
)
.unwrap();
};

barrier.wait();
barrier_2.wait();

unsafe {
let mut builder = SubmitCommandBufferBuilder::new();
builder.add_wait_semaphore(
release_sem.clone(),
PipelineStages {
all_commands: true,
..PipelineStages::empty()
},
);
builder.submit(&queue).unwrap();
let mut queue_guard = queue.lock();
queue_guard
.submit_unchecked(
[SubmitInfo {
wait_semaphores: vec![SemaphoreSubmitInfo::semaphore(
release_sem.clone(),
)],
..Default::default()
}],
None,
)
.unwrap();
};

previous_frame_end.as_mut().unwrap().cleanup_finished();
Expand Down
1 change: 0 additions & 1 deletion vulkano/src/command_buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ use std::sync::Arc;
mod auto;
mod commands;
pub mod pool;
pub mod submit;
pub mod synced;
pub mod sys;
mod traits;
Expand Down
Loading