Restructured everything to make profiling a feature of iced_winit.
This commit is contained in:
parent
c5cd236b73
commit
4b6d3797d4
23 changed files with 184 additions and 254 deletions
|
|
@ -6,8 +6,8 @@ use bytemuck::{Pod, Zeroable};
|
|||
use std::mem;
|
||||
use wgpu::util::DeviceExt;
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
use iced_profiling::info_span;
|
||||
#[cfg(feature = "tracing")]
|
||||
use tracing::info_span;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Pipeline {
|
||||
|
|
@ -176,7 +176,7 @@ impl Pipeline {
|
|||
bounds: Rectangle<u32>,
|
||||
target: &wgpu::TextureView,
|
||||
) {
|
||||
#[cfg(feature = "trace")]
|
||||
#[cfg(feature = "tracing")]
|
||||
let _ = info_span!("Wgpu::Quad", "DRAW").entered();
|
||||
|
||||
let uniforms = Uniforms::new(transformation, scale);
|
||||
|
|
@ -213,7 +213,7 @@ impl Pipeline {
|
|||
|
||||
instance_buffer.copy_from_slice(instance_bytes);
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
#[cfg(feature = "tracing")]
|
||||
let _ = info_span!("Wgpu::Quad", "BEGIN_RENDER_PASS").enter();
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue