Skip to content

Commit 300c317

Browse files
committed
move ash_renderer into mod ash, manual adjustments
1 parent 8583455 commit 300c317

5 files changed

Lines changed: 85 additions & 80 deletions

File tree

graphics/mygraphics/src/ash_renderer/graphics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use crate::device::MyDevice;
2-
use crate::single_command_buffer::SingleCommandBuffer;
3-
use crate::swapchain::DrawFrame;
1+
use crate::ash_renderer::device::MyDevice;
2+
use crate::ash_renderer::single_command_buffer::SingleCommandBuffer;
3+
use crate::ash_renderer::swapchain::DrawFrame;
44
use anyhow::Context;
55
use ash::vk;
66
use mygraphics_shaders::ShaderConstants;

graphics/mygraphics/src/ash_renderer/mod.rs

Lines changed: 3 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,6 @@
1-
// FIXME(eddyb) update/review these lints.
2-
//
3-
// BEGIN - Embark standard lints v0.4
4-
// do not change or add/remove here, but one can add exceptions after this section
5-
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
6-
//#![deny(unsafe_code)] // impractical in this crate dealing with unsafe `ash`
7-
#![warn(
8-
clippy::all,
9-
clippy::await_holding_lock,
10-
clippy::char_lit_as_u8,
11-
clippy::checked_conversions,
12-
clippy::dbg_macro,
13-
clippy::debug_assert_with_mut_call,
14-
clippy::doc_markdown,
15-
clippy::empty_enum,
16-
clippy::enum_glob_use,
17-
clippy::exit,
18-
clippy::expl_impl_clone_on_copy,
19-
clippy::explicit_deref_methods,
20-
clippy::explicit_into_iter_loop,
21-
clippy::fallible_impl_from,
22-
clippy::filter_map_next,
23-
clippy::float_cmp_const,
24-
clippy::fn_params_excessive_bools,
25-
clippy::if_let_mutex,
26-
clippy::implicit_clone,
27-
clippy::imprecise_flops,
28-
clippy::inefficient_to_string,
29-
clippy::invalid_upcast_comparisons,
30-
clippy::large_types_passed_by_value,
31-
clippy::let_unit_value,
32-
clippy::linkedlist,
33-
clippy::lossy_float_literal,
34-
clippy::macro_use_imports,
35-
clippy::manual_ok_or,
36-
clippy::map_err_ignore,
37-
clippy::map_flatten,
38-
clippy::map_unwrap_or,
39-
clippy::match_same_arms,
40-
clippy::match_wildcard_for_single_variants,
41-
clippy::mem_forget,
42-
clippy::mut_mut,
43-
clippy::mutex_integer,
44-
clippy::needless_borrow,
45-
clippy::needless_continue,
46-
clippy::option_option,
47-
clippy::path_buf_push_overwrite,
48-
clippy::ptr_as_ptr,
49-
clippy::ref_option_ref,
50-
clippy::rest_pat_in_fully_bound_structs,
51-
clippy::same_functions_in_if_condition,
52-
clippy::semicolon_if_nothing_returned,
53-
clippy::string_add_assign,
54-
clippy::string_add,
55-
clippy::string_lit_as_bytes,
56-
clippy::string_to_string,
57-
clippy::todo,
58-
clippy::trait_duplication_in_bounds,
59-
clippy::unimplemented,
60-
clippy::unnested_or_patterns,
61-
clippy::unused_self,
62-
clippy::useless_transmute,
63-
clippy::verbose_file_reads,
64-
clippy::zero_sized_map_values,
65-
future_incompatible,
66-
nonstandard_style,
67-
rust_2018_idioms
68-
)]
69-
// END - Embark standard lints v0.4
70-
// crate-specific exceptions:
71-
// #![allow()]
72-
73-
use crate::device::MyDevice;
74-
use crate::graphics::{MyRenderPipelineManager, MyRenderer};
75-
use crate::swapchain::MySwapchainManager;
1+
use crate::ash_renderer::device::MyDevice;
2+
use crate::ash_renderer::graphics::{MyRenderPipelineManager, MyRenderer};
3+
use crate::ash_renderer::swapchain::MySwapchainManager;
764
use ash::util::read_spv;
775
use mygraphics_shaders::ShaderConstants;
786
use raw_window_handle::HasDisplayHandle as _;

graphics/mygraphics/src/ash_renderer/single_command_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::device::MyDevice;
1+
use crate::ash_renderer::device::MyDevice;
22
use ash::vk;
33
use std::sync::Arc;
44

graphics/mygraphics/src/ash_renderer/swapchain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::device::MyDevice;
1+
use crate::ash_renderer::device::MyDevice;
22
use anyhow::Context;
33
use ash::vk;
44
use raw_window_handle::{HasDisplayHandle, HasWindowHandle};

graphics/mygraphics/src/main.rs

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// FIXME(eddyb) update/review these lints.
2+
//
3+
// BEGIN - Embark standard lints v0.4
4+
// do not change or add/remove here, but one can add exceptions after this section
5+
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
6+
//#![deny(unsafe_code)] // impractical in this crate dealing with unsafe `ash`
7+
#![warn(
8+
clippy::all,
9+
clippy::await_holding_lock,
10+
clippy::char_lit_as_u8,
11+
clippy::checked_conversions,
12+
clippy::dbg_macro,
13+
clippy::debug_assert_with_mut_call,
14+
clippy::doc_markdown,
15+
clippy::empty_enum,
16+
clippy::enum_glob_use,
17+
clippy::exit,
18+
clippy::expl_impl_clone_on_copy,
19+
clippy::explicit_deref_methods,
20+
clippy::explicit_into_iter_loop,
21+
clippy::fallible_impl_from,
22+
clippy::filter_map_next,
23+
clippy::float_cmp_const,
24+
clippy::fn_params_excessive_bools,
25+
clippy::if_let_mutex,
26+
clippy::implicit_clone,
27+
clippy::imprecise_flops,
28+
clippy::inefficient_to_string,
29+
clippy::invalid_upcast_comparisons,
30+
clippy::large_types_passed_by_value,
31+
clippy::let_unit_value,
32+
clippy::linkedlist,
33+
clippy::lossy_float_literal,
34+
clippy::macro_use_imports,
35+
clippy::manual_ok_or,
36+
clippy::map_err_ignore,
37+
clippy::map_flatten,
38+
clippy::map_unwrap_or,
39+
clippy::match_same_arms,
40+
clippy::match_wildcard_for_single_variants,
41+
clippy::mem_forget,
42+
clippy::mut_mut,
43+
clippy::mutex_integer,
44+
clippy::needless_borrow,
45+
clippy::needless_continue,
46+
clippy::option_option,
47+
clippy::path_buf_push_overwrite,
48+
clippy::ptr_as_ptr,
49+
clippy::ref_option_ref,
50+
clippy::rest_pat_in_fully_bound_structs,
51+
clippy::same_functions_in_if_condition,
52+
clippy::semicolon_if_nothing_returned,
53+
clippy::string_add_assign,
54+
clippy::string_add,
55+
clippy::string_lit_as_bytes,
56+
clippy::string_to_string,
57+
clippy::todo,
58+
clippy::trait_duplication_in_bounds,
59+
clippy::unimplemented,
60+
clippy::unnested_or_patterns,
61+
clippy::unused_self,
62+
clippy::useless_transmute,
63+
clippy::verbose_file_reads,
64+
clippy::zero_sized_map_values,
65+
future_incompatible,
66+
nonstandard_style,
67+
rust_2018_idioms
68+
)]
69+
// END - Embark standard lints v0.4
70+
// crate-specific exceptions:
71+
// #![allow()]
72+
73+
pub mod ash_renderer;
74+
75+
pub fn main() -> anyhow::Result<()> {
76+
ash_renderer::main()
77+
}

0 commit comments

Comments
 (0)