Update wgpu to better handle optional attachment load/store ops (#34646)

* Update wgpu to better handle attachment load/store ops

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

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-16 19:58:53 +01:00 committed by GitHub
parent 3d816d6d24
commit d7eb0c5c38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 31 additions and 132 deletions

View file

@ -406,19 +406,21 @@ impl Convert<wgt::BlendComponent> for &GPUBlendComponent {
}
}
pub fn convert_load_op(op: Option<GPULoadOp>) -> wgpu_com::LoadOp {
match op {
Some(GPULoadOp::Load) => wgpu_com::LoadOp::Load,
Some(GPULoadOp::Clear) => wgpu_com::LoadOp::Clear,
None => wgpu_com::LoadOp::Clear,
impl Convert<wgpu_com::LoadOp> for &GPULoadOp {
fn convert(self) -> wgpu_com::LoadOp {
match self {
GPULoadOp::Load => wgpu_com::LoadOp::Load,
GPULoadOp::Clear => wgpu_com::LoadOp::Clear,
}
}
}
pub fn convert_store_op(op: Option<GPUStoreOp>) -> wgpu_com::StoreOp {
match op {
Some(GPUStoreOp::Store) => wgpu_com::StoreOp::Store,
Some(GPUStoreOp::Discard) => wgpu_com::StoreOp::Discard,
None => wgpu_com::StoreOp::Discard,
impl Convert<wgpu_com::StoreOp> for &GPUStoreOp {
fn convert(self) -> wgpu_com::StoreOp {
match self {
GPUStoreOp::Store => wgpu_com::StoreOp::Store,
GPUStoreOp::Discard => wgpu_com::StoreOp::Discard,
}
}
}