feat: move profiling on windows platform - [10/20]

- add a new module `profiling` to the `src/platform/windows/` directory
- create a new file `profiling.rs` in the `src/platform/windows/` directory
- refactor the `d3d` module in the `profiling` directory to be accessed from the `platform/windows` module
This commit is contained in:
Alexsander Falcucci 2025-10-24 22:34:04 +02:00
parent 05ba4fdd6b
commit ca5e41c0fb
4 changed files with 9 additions and 2 deletions

View file

@ -8,7 +8,6 @@ use clap::{
ArgAction, Parser,
};
use winit::window::CursorIcon;
#[cfg(target_os = "windows")]
pub const SRGB_DEFAULT: &str = "1";
#[cfg(not(target_os = "windows"))]

View file

@ -1,4 +1,5 @@
pub mod bridge;
pub mod profiling;
pub mod renderer;
pub mod settings;
pub mod vsync;

View file

@ -0,0 +1,3 @@
#[cfg(feature = "gpu_profiling")]
#[path = "../../profiling/d3d.rs"]
pub mod d3d;

View file

@ -1,10 +1,14 @@
#[cfg(all(feature = "gpu_profiling", target_os = "windows"))]
use crate::platform::windows;
#[cfg(not(feature = "profiling"))]
mod profiling_disabled;
#[cfg(feature = "profiling")]
mod profiling_enabled;
#[cfg(all(feature = "gpu_profiling", target_os = "windows"))]
pub mod d3d;
pub mod d3d {
pub use crate::platform::windows::profiling::d3d::*;
}
#[cfg(feature = "gpu_profiling")]
pub mod opengl;