mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-26 09:21:04 +01:00
Integrate with RenderDoc on winit-less captures (#627)
This commit is contained in:
1 parent
0a0ef9a100
commit
5bbe6ec38c
4 files changed
+66
-7
No files matched your search
+14
-2
@@ -427,6 +427,10 @@ fn main() {
|
||||
|
||||
env_logger::init();
|
||||
|
||||
#[cfg(feature = "renderdoc")]
|
||||
let mut rd = renderdoc::RenderDoc::<renderdoc::V110>::new()
|
||||
.expect("Failed to connect to RenderDoc: are you running without it?");
|
||||
|
||||
//TODO: setting for the backend bits
|
||||
//TODO: setting for the target frame, or controls
|
||||
|
||||
@@ -492,8 +496,16 @@ fn main() {
|
||||
|
||||
log::info!("Executing actions");
|
||||
#[cfg(not(feature = "winit"))]
|
||||
while let Some(action) = actions.pop() {
|
||||
gfx_select!(device => global.process(device, action, &dir, &mut command_buffer_id_manager));
|
||||
{
|
||||
#[cfg(feature = "renderdoc")]
|
||||
rd.start_frame_capture(ptr::null(), ptr::null());
|
||||
|
||||
while let Some(action) = actions.pop() {
|
||||
gfx_select!(device => global.process(device, action, &dir, &mut command_buffer_id_manager));
|
||||
}
|
||||
|
||||
#[cfg(feature = "renderdoc")]
|
||||
rd.end_frame_capture(ptr::null(), ptr::null());
|
||||
}
|
||||
#[cfg(feature = "winit")]
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user