Skip to content

Commit bfe037d

Browse files
committed
Format
1 parent 47298ba commit bfe037d

2 files changed

Lines changed: 29 additions & 10 deletions

File tree

tests/tests/wgpu-gpu/ray_tracing/pipelines.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ static PIPELINE_OUTPUT: GpuTestConfiguration = GpuTestConfiguration::new()
234234
.run_sync(pipeline_output);
235235

236236
fn pipeline_output(ctx: TestingContext) {
237-
238237
let ray_gen_source = "
239238
enable wgpu_ray_tracing_pipeline;
240239
@@ -326,14 +325,19 @@ fn pipeline_output(ctx: TestingContext) {
326325
encoder.copy_buffer_to_buffer(&out_buffer, 0, &readback, 0, out_buffer.size());
327326

328327
ctx.queue.submit([encoder.finish()]);
329-
328+
330329
let (send, recv) = mpsc::channel();
331-
readback.map_async(wgpu::MapMode::Read, .., move |res| {res.unwrap(); send.send(()).unwrap()});
332-
ctx.device.poll(wgpu::PollType::wait_indefinitely()).unwrap();
330+
readback.map_async(wgpu::MapMode::Read, .., move |res| {
331+
res.unwrap();
332+
send.send(()).unwrap()
333+
});
334+
ctx.device
335+
.poll(wgpu::PollType::wait_indefinitely())
336+
.unwrap();
333337

334338
recv.recv().unwrap();
335339

336340
let range = readback.get_mapped_range(..).unwrap();
337341

338342
assert_eq!(range[0], 1)
339-
}
343+
}

wgpu-core/src/command/ray_tracing_pass.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,27 @@ use wgt::{
99
};
1010

1111
use crate::{
12-
Label, api_log, binding_model::{BindError, BindGroup, ImmediateUploadError, LateMinBufferBindingSizeMismatch}, command::{
13-
ArcCommand, BasePass, BindGroupStateChange, CommandEncoder, CommandEncoderError, DebugGroupError, EncoderStateError, EncodingState, InnerCommandEncoder, MapPassErr, PassErrorScope, PassStateError, StateChange, bind::{Binder, BinderError}, memory_init::{SurfacesInDiscardState, fixup_discarded_surfaces}, pass::{self, ImmediateState, flush_bindings_helper}, pass_base, pass_try, ray_tracing_pass_commands::ArcRayTracingCommand
14-
}, device::{Device, DeviceError, MissingDownlevelFlags, MissingFeatures}, hal_label, id, impl_resource_type, pipeline::RayTracingPipeline, resource::{
12+
api_log,
13+
binding_model::{BindError, BindGroup, ImmediateUploadError, LateMinBufferBindingSizeMismatch},
14+
command::{
15+
bind::{Binder, BinderError},
16+
memory_init::{fixup_discarded_surfaces, SurfacesInDiscardState},
17+
pass::{self, flush_bindings_helper, ImmediateState},
18+
pass_base, pass_try,
19+
ray_tracing_pass_commands::ArcRayTracingCommand,
20+
ArcCommand, BasePass, BindGroupStateChange, CommandEncoder, CommandEncoderError,
21+
DebugGroupError, EncoderStateError, EncodingState, InnerCommandEncoder, MapPassErr,
22+
PassErrorScope, PassStateError, StateChange,
23+
},
24+
device::{Device, DeviceError, MissingDownlevelFlags, MissingFeatures},
25+
hal_label, id, impl_resource_type,
26+
pipeline::RayTracingPipeline,
27+
resource::{
1528
DestroyedResourceError, InvalidOrDestroyedResourceError, InvalidResourceError, Labeled,
1629
MissingBufferUsageError, ParentDevice,
17-
}, track::{ResourceUsageCompatibilityError, Tracker}
30+
},
31+
track::{ResourceUsageCompatibilityError, Tracker},
32+
Label,
1833
};
1934

2035
pub type RayTracingBasePass = BasePass<ArcRayTracingCommand, RayTracingPassError>;
@@ -355,7 +370,7 @@ impl<'scope, 'snatch_guard, 'cmd_enc> State<'scope, 'snatch_guard, 'cmd_enc> {
355370
/// # Differences between render and compute (from which ray tracing passes inherit functionality) passes
356371
///
357372
/// Ray tracing pipelines behave the same as compute pipelines.
358-
///
373+
///
359374
/// There are differences between the `flush_bindings` implementations for
360375
/// render and compute passes, because render passes have a single usage
361376
/// scope for the entire pass, and compute passes have a separate usage

0 commit comments

Comments
 (0)