mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-29 10:14:29 +00:00
Fix mistake when deleting submissions
This commit is contained in:
parent
f774878e69
commit
900fe5ace3
@ -77,5 +77,5 @@ If you keep pushing submission objects in your `Vec` you will ultimately run out
|
|||||||
Cleaning the objects that are no longer needed can be done like this:
|
Cleaning the objects that are no longer needed can be done like this:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
submissions.retain(|s| !s.destroying_would_block());
|
submissions.retain(|s| s.destroying_would_block());
|
||||||
```
|
```
|
||||||
|
@ -218,7 +218,7 @@ fn main() {
|
|||||||
let mut submissions: Vec<Arc<vulkano::command_buffer::Submission>> = Vec::new();
|
let mut submissions: Vec<Arc<vulkano::command_buffer::Submission>> = Vec::new();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
submissions.retain(|s| !s.destroying_would_block());
|
submissions.retain(|s| s.destroying_would_block());
|
||||||
|
|
||||||
let image_num = swapchain.acquire_next_image(1000000).unwrap();
|
let image_num = swapchain.acquire_next_image(1000000).unwrap();
|
||||||
submissions.push(vulkano::command_buffer::submit(&command_buffers[image_num], &queue).unwrap());
|
submissions.push(vulkano::command_buffer::submit(&command_buffers[image_num], &queue).unwrap());
|
||||||
|
Loading…
Reference in New Issue
Block a user