Update wgpu to trunk (#34607)

* Update wgpu

8f82992b9f
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>
This commit is contained in:
Samson 2024-12-13 19:28:47 +01:00 committed by GitHub
parent 80c4afa63a
commit d24234ac72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 96 additions and 581 deletions

View file

@ -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,
}))
})

View file

@ -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