Skip to content

Commit

Permalink
[rs] Merge gfx-rs#880
Browse files Browse the repository at this point in the history
880: Remove profiling dependency, bump version to 0.8 r=kvark a=kvark

Picks up gfx-rs#1355 and removes profiling markers from wgpu-rs. They don't show anything extra on top of wgpu-core markers, see https://github.com/gfx-rs/wgpu-rs/discussions/879

Co-authored-by: Dzmitry Malyshau <[email protected]>
  • Loading branch information
bors[bot] and kvark authored Apr 29, 2021
2 parents 85a1480 + b73887f commit e83e4ff
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
6 changes: 6 additions & 0 deletions wgpu/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

### v0.8 (2021-04-29)
- See https://github.com/gfx-rs/wgpu/blob/v0.8/CHANGELOG.md#v08-2021-04-29
- Naga is the default shader conversion path on Metal, Vulkan, and OpenGL
- SPIRV-Cross is optionally enabled with "cross" feature
- All of the examples (except "texture-array") now use WGSL

### v0.7 (2021-01-31)
- See https://github.com/gfx-rs/wgpu/blob/v0.7/CHANGELOG.md#v07-2020-08-30
- Features:
Expand Down
3 changes: 1 addition & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wgpu"
version = "0.7.0"
version = "0.8.0"
authors = ["wgpu developers"]
edition = "2018"
description = "Rusty WebGPU API wrapper"
Expand Down Expand Up @@ -45,7 +45,6 @@ rev = "e5ddb94be0221b0f53a8f43adfb15458daebfd7c"
arrayvec = "0.5"
log = "0.4"
parking_lot = "0.11"
profiling = { version = "1", default-features = false }
raw-window-handle = "0.3"
serde = { version = "1", features = ["derive"], optional = true }
smallvec = "1"
Expand Down
8 changes: 0 additions & 8 deletions wgpu/src/backend/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ mod pass_impl {
&mut self,
render_bundles: I,
) {
profiling::scope!("RenderPass::execute_bundles wrapper");
let temp_render_bundles = render_bundles.cloned().collect::<SmallVec<[_; 4]>>();
unsafe {
wgpu_render_pass_execute_bundles(
Expand Down Expand Up @@ -858,7 +857,6 @@ impl crate::Context for Context {
device: &Self::DeviceId,
desc: &BindGroupDescriptor,
) -> Self::BindGroupId {
profiling::scope!("Device::create_bind_group wrapper");
use wgc::binding_model as bm;

let mut arrayed_texture_views = Vec::new();
Expand Down Expand Up @@ -953,8 +951,6 @@ impl crate::Context for Context {
device: &Self::DeviceId,
desc: &PipelineLayoutDescriptor,
) -> Self::PipelineLayoutId {
profiling::scope!("Device::create_pipeline_layout wrapper");

// Limit is always less or equal to wgc::MAX_BIND_GROUPS, so this is always right
// Guards following ArrayVec
assert!(
Expand Down Expand Up @@ -998,7 +994,6 @@ impl crate::Context for Context {
device: &Self::DeviceId,
desc: &RenderPipelineDescriptor,
) -> Self::RenderPipelineId {
profiling::scope!("Device::create_render_pipeline wrapper");
use wgc::pipeline as pipe;

let vertex_buffers: ArrayVec<[_; wgc::device::MAX_VERTEX_BUFFERS]> = desc
Expand Down Expand Up @@ -1316,8 +1311,6 @@ impl crate::Context for Context {
mode: MapMode,
range: Range<wgt::BufferAddress>,
) -> Self::MapAsyncFuture {
profiling::scope!("Buffer::buffer_map_async wrapper");

let (future, completion) = native_gpu_future::new_gpu_future();

extern "C" fn buffer_map_future_wrapper(
Expand Down Expand Up @@ -1728,7 +1721,6 @@ impl crate::Context for Context {
encoder: &Self::CommandEncoderId,
desc: &crate::RenderPassDescriptor<'a, '_>,
) -> Self::RenderPassId {
profiling::scope!("CommandEncoder::begin_render_pass wrapper");
let colors = desc
.color_attachments
.iter()
Expand Down
5 changes: 0 additions & 5 deletions wgpu/src/util/belt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ impl StagingBelt {
self.free_chunks.swap_remove(index)
} else {
let size = self.chunk_size.max(size.get());
#[cfg(not(target_arch = "wasm32"))]
profiling::scope!("Creating chunk of size {}");
Chunk {
buffer: device.create_buffer(&BufferDescriptor {
label: Some("staging"),
Expand Down Expand Up @@ -148,9 +146,6 @@ impl StagingBelt {
/// At this point, all the partially used staging buffers are closed until
/// the GPU is done copying the data from them.
pub fn finish(&mut self) {
#[cfg(not(target_arch = "wasm32"))]
profiling::scope!("Finishing chunks");

for chunk in self.active_chunks.drain(..) {
chunk.buffer.unmap();
self.closed_chunks.push(chunk);
Expand Down

0 comments on commit e83e4ff

Please sign in to comment.