macro_rules! gpu_profile_scope {
($frame:expr, $label:expr, $body:expr) => { ... };
}Expand description
Execute a block of code within a GPU profiling scope on a Frame.
When the gpu-profiling feature is enabled and a GPU profiler is attached
to the frame, this creates a GPU timing scope around the block.
When disabled or no profiler is attached, the block is executed directly.
§Usage
ⓘ
use astrelis_render::gpu_profile_scope;
gpu_profile_scope!(frame, "upload_textures", |encoder| {
encoder.copy_buffer_to_buffer(&src, 0, &dst, 0, size);
});