Skip to content

Commit 5ecc48d

Browse files
committed
add RenderPassColorAttachment::depth_slice
1 parent 6058dd4 commit 5ecc48d

File tree

56 files changed

+76
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+76
-2
lines changed

benches/benches/wgpu-benchmark/renderpass.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ impl RenderpassState {
360360
label: None,
361361
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
362362
view: &self.render_target,
363+
depth_slice: None,
363364
resolve_target: None,
364365
ops: wgpu::Operations {
365366
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
@@ -406,6 +407,7 @@ impl RenderpassState {
406407
label: None,
407408
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
408409
view: &self.render_target,
410+
depth_slice: None,
409411
resolve_target: None,
410412
ops: wgpu::Operations {
411413
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),

deno_webgpu/command_encoder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl GPUCommandEncoder {
6363
attachment.into_option().map(|attachment| {
6464
wgpu_core::command::RenderPassColorAttachment {
6565
view: attachment.view.id,
66+
depth_slice: attachment.depth_slice,
6667
resolve_target: attachment.resolve_target.map(|target| target.id),
6768
load_op: attachment
6869
.load_op

deno_webgpu/render_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ pub(crate) struct GPURenderPassDescriptor {
402402
#[webidl(dictionary)]
403403
pub(crate) struct GPURenderPassColorAttachment {
404404
pub view: Ptr<GPUTextureView>,
405-
/*#[options(enforce_range = true)]
406-
pub depth_slice: Option<u32>,*/
405+
#[options(enforce_range = true)]
406+
pub depth_slice: Option<u32>,
407407
pub resolve_target: Option<Ptr<GPUTextureView>>,
408408
pub clear_value: Option<GPUColor>,
409409
pub load_op: GPULoadOp,

examples/features/src/boids/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ impl crate::framework::Example for Example {
263263
// create render pass descriptor and its color attachments
264264
let color_attachments = [Some(wgpu::RenderPassColorAttachment {
265265
view,
266+
depth_slice: None,
266267
resolve_target: None,
267268
ops: wgpu::Operations {
268269
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),

examples/features/src/bunnymark/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ impl Example {
112112
label: None,
113113
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
114114
view,
115+
depth_slice: None,
115116
resolve_target: None,
116117
ops: wgpu::Operations {
117118
load: wgpu::LoadOp::Clear(clear_color),

examples/features/src/conservative_raster/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ impl crate::framework::Example for Example {
263263
label: Some("low resolution"),
264264
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
265265
view: &self.low_res_target,
266+
depth_slice: None,
266267
resolve_target: None,
267268
ops: wgpu::Operations {
268269
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
@@ -284,6 +285,7 @@ impl crate::framework::Example for Example {
284285
label: Some("full resolution"),
285286
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
286287
view,
288+
depth_slice: None,
287289
resolve_target: None,
288290
ops: wgpu::Operations {
289291
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),

examples/features/src/cube/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ impl crate::framework::Example for Example {
341341
label: None,
342342
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
343343
view,
344+
depth_slice: None,
344345
resolve_target: None,
345346
ops: wgpu::Operations {
346347
load: wgpu::LoadOp::Clear(wgpu::Color {

examples/features/src/hello_triangle/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ async fn run(event_loop: EventLoop<()>, window: Window) {
118118
label: None,
119119
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
120120
view: &view,
121+
depth_slice: None,
121122
resolve_target: None,
122123
ops: wgpu::Operations {
123124
load: wgpu::LoadOp::Clear(wgpu::Color::GREEN),

examples/features/src/hello_windows/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ async fn run(event_loop: EventLoop<()>, viewports: Vec<(Arc<Window>, wgpu::Color
119119
color_attachments: &[Some(
120120
wgpu::RenderPassColorAttachment {
121121
view: &view,
122+
depth_slice: None,
122123
resolve_target: None,
123124
ops: wgpu::Operations {
124125
load: wgpu::LoadOp::Clear(

examples/features/src/mipmap/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ impl Example {
160160
label: None,
161161
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
162162
view: &views[target_mip],
163+
depth_slice: None,
163164
resolve_target: None,
164165
ops: wgpu::Operations {
165166
load: wgpu::LoadOp::Clear(wgpu::Color::WHITE),
@@ -481,6 +482,7 @@ impl crate::framework::Example for Example {
481482
label: None,
482483
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
483484
view,
485+
depth_slice: None,
484486
resolve_target: None,
485487
ops: wgpu::Operations {
486488
load: wgpu::LoadOp::Clear(clear_color),

0 commit comments

Comments
 (0)