2026-11-23 01:15:26 +01:00
|
|
|
//! D3D12.X on host D3D12.
|
|
|
|
|
//!
|
2026-11-23 14:42:21 +01:00
|
|
|
//! D3D12.X records commands from code inlined into the title, which writes
|
|
|
|
|
//! packets into the command list while its put pointer is below a limit and
|
|
|
|
|
//! calls the list's method otherwise. Our lists keep the limits at zero, so
|
|
|
|
|
//! every command arrives here as a call, to be run on host D3D12. The
|
|
|
|
|
//! title's GPU addresses are CPU addresses (console memory is unified).
|
2026-11-23 01:15:26 +01:00
|
|
|
//!
|
2026-11-23 14:42:21 +01:00
|
|
|
//! [`device`] is the device object titles create, [`dxgi`] its adapter side,
|
|
|
|
|
//! [`resource`] heaps and resources, [`fence`] fences, [`queue`] command
|
|
|
|
|
//! queues, [`list`] command allocators and lists, [`descriptor`]
|
|
|
|
|
//! descriptor heaps, [`root`] root signatures, [`query`] query heaps,
|
|
|
|
|
//! [`signature`] command signatures, [`pipeline`] pipeline states,
|
|
|
|
|
//! [`frame`] frame pacing, [`object`] what all console graphics objects
|
2026-11-23 23:10:01 +01:00
|
|
|
//! share, [`console`] which console model the title sees. Planned:
|
|
|
|
|
//! `present` (swap chain).
|
2026-11-23 14:42:21 +01:00
|
|
|
|
2026-11-25 11:09:43 -06:00
|
|
|
#[cfg(windows)]
|
2026-11-27 15:03:27 -08:00
|
|
|
mod ahead;
|
2026-11-25 11:09:43 -06:00
|
|
|
mod ambient;
|
2026-11-23 23:10:01 +01:00
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
mod capture;
|
2026-11-25 14:43:52 -08:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod compose;
|
2026-11-23 23:10:01 +01:00
|
|
|
pub mod console;
|
|
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
mod copystat;
|
2026-11-25 11:36:09 -06:00
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
mod faultbook;
|
2026-11-25 06:53:52 -06:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod cores;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod descriptor;
|
|
|
|
|
pub mod device;
|
2026-11-23 23:10:01 +01:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod draw;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod dxgi;
|
2026-11-26 20:22:46 +05:30
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod external;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod fence;
|
|
|
|
|
pub mod frame;
|
2026-11-25 06:53:10 -06:00
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
mod book;
|
2026-11-23 14:42:21 +01:00
|
|
|
#[cfg(windows)]
|
2026-11-27 00:25:55 +05:30
|
|
|
mod heap_marks;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-23 14:42:21 +01:00
|
|
|
mod host;
|
2026-11-26 19:41:59 -08:00
|
|
|
/// The F1 settings menu is shown (`host/menu.rs`): the title gets no keyboard meanwhile
|
|
|
|
|
/// (read by the input module).
|
|
|
|
|
pub static SETTINGS_MENU_OPEN: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
|
2026-11-24 00:12:44 +01:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod indirect;
|
2026-11-24 13:02:18 -05:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod inplace;
|
2026-11-24 22:14:03 -06:00
|
|
|
#[cfg(windows)]
|
2026-11-25 23:33:12 -06:00
|
|
|
mod port;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-24 22:14:03 -06:00
|
|
|
mod land;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod list;
|
|
|
|
|
pub mod object;
|
|
|
|
|
pub mod pipeline;
|
2026-11-23 23:10:01 +01:00
|
|
|
#[cfg(windows)]
|
2026-11-24 23:09:03 -06:00
|
|
|
mod picked;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-24 18:55:40 -06:00
|
|
|
mod pool;
|
2026-11-25 10:39:25 -06:00
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
mod popwatch;
|
2026-11-24 18:55:40 -06:00
|
|
|
#[cfg(windows)]
|
2026-11-23 23:10:01 +01:00
|
|
|
mod primitive;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod query;
|
|
|
|
|
pub mod queue;
|
2026-11-24 20:00:23 -06:00
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
pub mod replay;
|
2026-11-25 14:43:52 -08:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod residency;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod resource;
|
2026-11-27 16:56:19 -08:00
|
|
|
pub mod save_share;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod root;
|
2026-11-23 23:10:01 +01:00
|
|
|
#[cfg(windows)]
|
2026-11-24 20:28:42 -06:00
|
|
|
mod safecopy;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-23 23:10:01 +01:00
|
|
|
mod sampler;
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
|
pub mod shader_cache;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-24 13:02:18 -05:00
|
|
|
mod memory;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-23 23:10:01 +01:00
|
|
|
mod shadow;
|
2026-11-25 00:44:25 -05:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod tiles;
|
2026-11-23 14:42:21 +01:00
|
|
|
pub mod signature;
|
2026-11-26 20:22:46 +05:30
|
|
|
#[cfg(windows)]
|
|
|
|
|
pub mod streamline;
|
2026-11-23 21:39:19 -08:00
|
|
|
mod switch;
|
2026-11-24 23:48:39 -06:00
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
mod ab;
|
2026-11-23 23:10:01 +01:00
|
|
|
#[cfg(windows)]
|
2026-11-24 16:33:46 +01:00
|
|
|
mod tdr;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-23 23:10:01 +01:00
|
|
|
mod texture;
|
2026-11-24 23:48:39 -06:00
|
|
|
pub mod timeline;
|
2026-11-23 23:10:01 +01:00
|
|
|
#[cfg(windows)]
|
2026-11-25 12:41:23 -06:00
|
|
|
pub mod titlewrite;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-25 03:11:24 -06:00
|
|
|
mod upload;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-23 23:10:01 +01:00
|
|
|
mod watch;
|
2026-11-25 15:31:36 -06:00
|
|
|
#[cfg(windows)]
|
|
|
|
|
mod texback;
|
2026-11-23 23:10:01 +01:00
|
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
|
pub use host::on_failure;
|
2026-11-27 12:07:42 -08:00
|
|
|
/// Reserves the address space for memory shaders read by address; call it
|
|
|
|
|
/// first thing, before the process's other allocations can fill [4 GiB, 2^37).
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
|
pub use upload::reserve_space as reserve_upload_space;
|
2026-11-25 02:58:07 -06:00
|
|
|
|
2026-11-25 09:03:29 -06:00
|
|
|
/// Whether `switch` is on now, if it is one of those `VICTORY_AB` turns on and
|
|
|
|
|
/// off while the title runs (`ab`).
|
|
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
pub fn switched(switch: &str) -> Option<bool> {
|
|
|
|
|
ab::pick(switch)
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-25 02:58:07 -06:00
|
|
|
/// What the frame is at (`copystat::phase`), for the sampling profiler.
|
|
|
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
|
|
|
pub fn frame_phase() -> u32 {
|
|
|
|
|
copystat::phase()
|
|
|
|
|
}
|
2026-11-26 01:47:11 -06:00
|
|
|
|
|
|
|
|
/// Frames the title has begun (its frame waits that ended), for logs.
|
|
|
|
|
pub fn frames_begun() -> u64 {
|
|
|
|
|
frame::current()
|
|
|
|
|
}
|
2026-11-23 23:10:01 +01:00
|
|
|
#[cfg(windows)]
|
2026-11-24 22:03:45 -06:00
|
|
|
pub use inplace::{title_memory_freeing, title_memory_section, title_memory_section_gone, title_memory_view};
|
2026-11-24 13:02:18 -05:00
|
|
|
#[cfg(windows)]
|
2026-11-26 19:14:48 +05:30
|
|
|
pub use shadow::title_memory_write_combined;
|
|
|
|
|
#[cfg(windows)]
|
2026-11-24 13:02:18 -05:00
|
|
|
pub use watch::{
|
2026-11-27 00:29:57 +05:30
|
|
|
SoftViews, kernel_writing, soft_view_guards, title_memory_allocated, title_memory_freed, title_memory_made_real,
|
|
|
|
|
title_memory_reading, title_memory_remapped, title_memory_remapping, title_memory_splitting, title_memory_unmapping,
|
|
|
|
|
title_memory_written, use_lazy_views, use_soft_views, writing as kernel_will_write,
|
2026-11-24 13:02:18 -05:00
|
|
|
};
|