mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
parent
3d816d6d24
commit
d7eb0c5c38
6 changed files with 31 additions and 132 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue