diff options
author | Samson <16504129+sagudev@users.noreply.github.com> | 2024-12-13 19:28:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 18:28:47 +0000 |
commit | d24234ac72df6f8c3d25788db0eca5600283c976 (patch) | |
tree | 032c81f7dcf09d20a1ec38c51999e19d83b45608 /components/script/dom/webgpu | |
parent | 80c4afa63a5ab3bb9796b6ae9cb5b696312d67f5 (diff) | |
download | servo-d24234ac72df6f8c3d25788db0eca5600283c976.tar.gz servo-d24234ac72df6f8c3d25788db0eca5600283c976.zip |
Update wgpu to trunk (#34607)
* Update wgpu
https://github.com/gfx-rs/wgpu/commit/8f82992b9fa0fd71c19a4f5c2d8e2512ef22c010
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* fix warnings
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* re
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* re
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Allow git source for gfx-rs
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Diffstat (limited to 'components/script/dom/webgpu')
-rw-r--r-- | components/script/dom/webgpu/gpucommandencoder.rs | 8 | ||||
-rw-r--r-- | components/script/dom/webgpu/gpuconvert.rs | 18 |
2 files changed, 11 insertions, 15 deletions
diff --git a/components/script/dom/webgpu/gpucommandencoder.rs b/components/script/dom/webgpu/gpucommandencoder.rs index 252066e0749..712fb3edd28 100644 --- a/components/script/dom/webgpu/gpucommandencoder.rs +++ b/components/script/dom/webgpu/gpucommandencoder.rs @@ -176,7 +176,8 @@ impl GPUCommandEncoderMethods<crate::DomTypeHolder> for GPUCommandEncoder { .colorAttachments .iter() .map(|color| -> Fallible<_> { - let channel = wgpu_com::PassChannel { + Ok(Some(wgpu_com::RenderPassColorAttachment { + resolve_target: color.resolveTarget.as_ref().map(|t| t.id().0), load_op: convert_load_op(Some(color.loadOp)), store_op: convert_store_op(Some(color.storeOp)), clear_value: color @@ -185,11 +186,6 @@ impl GPUCommandEncoderMethods<crate::DomTypeHolder> for GPUCommandEncoder { .map(|color| (color).try_convert()) .transpose()? .unwrap_or_default(), - read_only: false, - }; - Ok(Some(wgpu_com::RenderPassColorAttachment { - resolve_target: color.resolveTarget.as_ref().map(|t| t.id().0), - channel, view: color.view.id().0, })) }) diff --git a/components/script/dom/webgpu/gpuconvert.rs b/components/script/dom/webgpu/gpuconvert.rs index bcb83ee80b5..f9ad05d2dc1 100644 --- a/components/script/dom/webgpu/gpuconvert.rs +++ b/components/script/dom/webgpu/gpuconvert.rs @@ -239,9 +239,9 @@ impl TryConvert<wgt::Extent3d> for &GPUExtent3D { } } -impl Convert<wgt::ImageDataLayout> for &GPUImageDataLayout { - fn convert(self) -> wgt::ImageDataLayout { - wgt::ImageDataLayout { +impl Convert<wgt::TexelCopyBufferLayout> for &GPUImageDataLayout { + fn convert(self) -> wgt::TexelCopyBufferLayout { + wgt::TexelCopyBufferLayout { offset: self.offset as wgt::BufferAddress, bytes_per_row: self.bytesPerRow, rows_per_image: self.rowsPerImage, @@ -437,9 +437,9 @@ impl Convert<wgt::StencilOperation> for GPUStencilOperation { } } -impl Convert<wgpu_com::ImageCopyBuffer> for &GPUImageCopyBuffer { - fn convert(self) -> wgpu_com::ImageCopyBuffer { - wgpu_com::ImageCopyBuffer { +impl Convert<wgpu_com::TexelCopyBufferInfo> for &GPUImageCopyBuffer { + fn convert(self) -> wgpu_com::TexelCopyBufferInfo { + wgpu_com::TexelCopyBufferInfo { buffer: self.buffer.id().0, layout: self.parent.convert(), } @@ -474,11 +474,11 @@ impl TryConvert<wgt::Origin3d> for &GPUOrigin3D { } } -impl TryConvert<wgpu_com::ImageCopyTexture> for &GPUImageCopyTexture { +impl TryConvert<wgpu_com::TexelCopyTextureInfo> for &GPUImageCopyTexture { type Error = Error; - fn try_convert(self) -> Result<wgpu_com::ImageCopyTexture, Self::Error> { - Ok(wgpu_com::ImageCopyTexture { + fn try_convert(self) -> Result<wgpu_com::TexelCopyTextureInfo, Self::Error> { + Ok(wgpu_com::TexelCopyTextureInfo { texture: self.texture.id().0, mip_level: self.mipLevel, origin: self |