@@ -5,14 +5,14 @@ use raw_window_handle::{HasDisplayHandle, HasWindowHandle};
5
5
use std:: sync:: Arc ;
6
6
7
7
/// A binary semaphore for swapchain operations
8
- pub struct SwapchainSync {
8
+ struct SwapchainSync {
9
9
acquire_semaphore : vk:: Semaphore ,
10
10
render_semaphore : vk:: Semaphore ,
11
11
render_fence : vk:: Fence ,
12
12
}
13
13
14
14
impl SwapchainSync {
15
- pub unsafe fn new ( device : & MyDevice ) -> anyhow:: Result < Self > {
15
+ unsafe fn new ( device : & MyDevice ) -> anyhow:: Result < Self > {
16
16
unsafe {
17
17
let signaled_fence =
18
18
vk:: FenceCreateInfo :: default ( ) . flags ( vk:: FenceCreateFlags :: SIGNALED ) ;
@@ -26,7 +26,7 @@ impl SwapchainSync {
26
26
}
27
27
}
28
28
29
- pub unsafe fn destroy ( & self , device : & MyDevice ) {
29
+ unsafe fn destroy ( & self , device : & MyDevice ) {
30
30
unsafe {
31
31
device. destroy_semaphore ( self . acquire_semaphore , None ) ;
32
32
device. destroy_semaphore ( self . render_semaphore , None ) ;
@@ -263,7 +263,7 @@ pub struct DrawFrame {
263
263
pub extent : vk:: Extent2D ,
264
264
/// the [`vk::Image`] to draw to
265
265
pub image : vk:: Image ,
266
- /// the [`vk::ImageImage `] to draw to, created from `image`
266
+ /// the [`vk::Image `] to draw to, created from `image`
267
267
pub image_view : vk:: ImageView ,
268
268
/// the `acquire_image` semaphore that must be waited for before draw commands are executed
269
269
pub acquire_semaphore : vk:: Semaphore ,
@@ -340,8 +340,7 @@ impl MySwapchainManager {
340
340
}
341
341
}
342
342
panic ! (
343
- "looped {} times trying to acquire swapchain image and failed repeatedly!" ,
344
- RECREATE_ATTEMPTS
343
+ "looped {RECREATE_ATTEMPTS} times trying to acquire swapchain image and failed repeatedly!"
345
344
) ;
346
345
}
347
346
}
0 commit comments