lib.rs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //! D3D12.X on host D3D12.
  2. //!
  3. //! D3D12.X records commands from code inlined into the title, which writes
  4. //! packets into the command list while its put pointer is below a limit and
  5. //! calls the list's method otherwise. Our lists keep the limits at zero, so
  6. //! every command arrives here as a call, to be run on host D3D12. The
  7. //! title's GPU addresses are CPU addresses (console memory is unified).
  8. //!
  9. //! [`device`] is the device object titles create, [`dxgi`] its adapter side,
  10. //! [`resource`] heaps and resources, [`fence`] fences, [`queue`] command
  11. //! queues, [`list`] command allocators and lists, [`descriptor`]
  12. //! descriptor heaps, [`root`] root signatures, [`query`] query heaps,
  13. //! [`signature`] command signatures, [`pipeline`] pipeline states,
  14. //! [`frame`] frame pacing, [`object`] what all console graphics objects
  15. //! share, [`console`] which console model the title sees. Planned:
  16. //! `present` (swap chain).
  17. #[cfg(all(windows, feature = "diagnostics"))]
  18. mod capture;
  19. pub mod console;
  20. #[cfg(all(windows, feature = "diagnostics"))]
  21. mod copystat;
  22. #[cfg(windows)]
  23. mod cores;
  24. pub mod descriptor;
  25. pub mod device;
  26. #[cfg(windows)]
  27. mod draw;
  28. pub mod dxgi;
  29. pub mod fence;
  30. pub mod frame;
  31. #[cfg(all(windows, feature = "diagnostics"))]
  32. mod book;
  33. #[cfg(windows)]
  34. mod host;
  35. #[cfg(windows)]
  36. mod indirect;
  37. #[cfg(windows)]
  38. mod inplace;
  39. #[cfg(windows)]
  40. mod land;
  41. pub mod list;
  42. pub mod object;
  43. pub mod pipeline;
  44. #[cfg(windows)]
  45. mod picked;
  46. #[cfg(windows)]
  47. mod pool;
  48. #[cfg(windows)]
  49. mod primitive;
  50. pub mod query;
  51. pub mod queue;
  52. #[cfg(all(windows, feature = "diagnostics"))]
  53. pub mod replay;
  54. pub mod resource;
  55. pub mod root;
  56. #[cfg(windows)]
  57. mod safecopy;
  58. #[cfg(windows)]
  59. mod sampler;
  60. #[cfg(windows)]
  61. pub mod shader_cache;
  62. #[cfg(windows)]
  63. mod memory;
  64. #[cfg(windows)]
  65. mod shadow;
  66. #[cfg(windows)]
  67. mod tiles;
  68. pub mod signature;
  69. mod switch;
  70. #[cfg(all(windows, feature = "diagnostics"))]
  71. mod ab;
  72. #[cfg(windows)]
  73. mod tdr;
  74. #[cfg(windows)]
  75. mod texture;
  76. pub mod timeline;
  77. #[cfg(windows)]
  78. mod upload;
  79. #[cfg(windows)]
  80. mod watch;
  81. #[cfg(windows)]
  82. pub use host::on_failure;
  83. /// Whether `switch` is on now, if it is one of those `VICTORY_AB` turns on and
  84. /// off while the title runs (`ab`).
  85. #[cfg(all(windows, feature = "diagnostics"))]
  86. pub fn switched(switch: &str) -> Option<bool> {
  87. ab::pick(switch)
  88. }
  89. /// What the frame is at (`copystat::phase`), for the sampling profiler.
  90. #[cfg(all(windows, feature = "diagnostics"))]
  91. pub fn frame_phase() -> u32 {
  92. copystat::phase()
  93. }
  94. #[cfg(windows)]
  95. pub use inplace::{title_memory_freeing, title_memory_section, title_memory_section_gone, title_memory_view};
  96. #[cfg(windows)]
  97. pub use watch::{
  98. kernel_writing, title_memory_allocated, title_memory_freed, title_memory_reading, title_memory_remapped,
  99. title_memory_remapping, title_memory_splitting, title_memory_unmapping, title_memory_written,
  100. writing as kernel_will_write,
  101. };