mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
Integrate with RenderDoc on winit-less captures (#627)
This commit is contained in:
parent
0a0ef9a100
commit
5bbe6ec38c
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -83,7 +83,7 @@ jobs:
|
||||
channel: stable
|
||||
build_command: rustup default stable-msvc; cargo clippy
|
||||
additional_core_features: trace
|
||||
additional_player_features:
|
||||
additional_player_features: renderdoc
|
||||
- os: windows-2019
|
||||
name: Windows Nightly
|
||||
channel: nightly
|
||||
|
54
Cargo.lock
generated
54
Cargo.lock
generated
@ -50,7 +50,7 @@ version = "0.30.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69daec0742947f33a85931fa3cb0ce5f07929159dcbd1f0cbb5b2912e2978509"
|
||||
dependencies = [
|
||||
"libloading",
|
||||
"libloading 0.5.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -270,7 +270,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc7ed48e89905e5e146bcc1951cc3facb9e44aea9adf5dc01078cda1bd24b662"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"libloading",
|
||||
"libloading 0.5.2",
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
@ -286,7 +286,7 @@ version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a"
|
||||
dependencies = [
|
||||
"libloading",
|
||||
"libloading 0.5.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -308,6 +308,15 @@ dependencies = [
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "float-cmp"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "499a1bfa03d254b047e7e5c1fc8dd23a8cf6b344a8eb7e622ae4bc76bfac8e68"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "foreign-types"
|
||||
version = "0.3.2"
|
||||
@ -368,7 +377,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"gfx-auxil",
|
||||
"gfx-hal",
|
||||
"libloading",
|
||||
"libloading 0.5.2",
|
||||
"log",
|
||||
"parking_lot",
|
||||
"range-alloc",
|
||||
@ -577,6 +586,15 @@ dependencies = [
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c4f51b790f5bdb65acb4cc94bb81d7b2ee60348a5431ac1467d390b017600b0"
|
||||
dependencies = [
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "line_drawing"
|
||||
version = "0.7.0"
|
||||
@ -767,6 +785,12 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b"
|
||||
|
||||
[[package]]
|
||||
name = "ordered-float"
|
||||
version = "1.0.2"
|
||||
@ -841,6 +865,7 @@ dependencies = [
|
||||
"env_logger",
|
||||
"log",
|
||||
"raw-window-handle",
|
||||
"renderdoc",
|
||||
"ron",
|
||||
"wgpu-core",
|
||||
"wgpu-types",
|
||||
@ -928,6 +953,27 @@ version = "0.6.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
|
||||
|
||||
[[package]]
|
||||
name = "renderdoc"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c9e8488c98756911664c8cc7b86284c320b6a6357d95908458136d7ebe9280c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"float-cmp",
|
||||
"libloading 0.6.1",
|
||||
"once_cell",
|
||||
"renderdoc-sys",
|
||||
"winapi 0.3.8",
|
||||
"wio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "renderdoc-sys"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60d4a9058849c3e765fe2fa68b72c1416b1766f27eac3c52d7bac8712ea0d390"
|
||||
|
||||
[[package]]
|
||||
name = "ron"
|
||||
version = "0.5.1"
|
||||
|
@ -18,6 +18,7 @@ publish = false
|
||||
env_logger = "0.7"
|
||||
log = "0.4"
|
||||
raw-window-handle = "0.3"
|
||||
renderdoc = { version = "0.8", optional = true, default_features = false }
|
||||
ron = "0.5"
|
||||
winit = { version = "0.22", optional = true }
|
||||
|
||||
|
@ -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")]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user