Skip to content

Commit

Permalink
gl | metal: updates the upper bounds of the extends of `SurfaceCapabi…
Browse files Browse the repository at this point in the history
…lities`
  • Loading branch information
jinleili authored and kvark committed Mar 2, 2022
1 parent 12f68ff commit 810dc5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ impl super::Adapter {
private_caps,
workarounds,
shading_language_version,
max_texture_size,
}),
},
info: Self::make_info(vendor, renderer),
Expand Down Expand Up @@ -718,8 +719,8 @@ impl crate::Adapter<super::Api> for super::Adapter {
height: 4,
depth_or_array_layers: 1,
}..=wgt::Extent3d {
width: 4096,
height: 4096,
width: self.shared.max_texture_size,
height: self.shared.max_texture_size,
depth_or_array_layers: 1,
},
usage: crate::TextureUses::COLOR_TARGET,
Expand Down
1 change: 1 addition & 0 deletions wgpu-hal/src/gles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ struct AdapterShared {
private_caps: PrivateCapabilities,
workarounds: Workarounds,
shading_language_version: naga::back::glsl::Version,
max_texture_size: u32,
}

pub struct Adapter {
Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ impl crate::Adapter<super::Api> for super::Adapter {
height: 4,
depth_or_array_layers: 1,
}..=wgt::Extent3d {
width: 4096,
height: 4096,
width: pc.max_texture_size as u32,
height: pc.max_texture_size as u32,
depth_or_array_layers: 1,
},
usage: crate::TextureUses::COLOR_TARGET | crate::TextureUses::COPY_DST, //TODO: expose more
Expand Down

0 comments on commit 810dc5a

Please sign in to comment.