gl | metal: updates the upper bounds of the extends of SurfaceCapabilities

This commit is contained in:
Jinlei Li 2022-03-01 15:02:25 +08:00 committed by Dzmitry Malyshau
parent 12f68ff15b
commit 810dc5aa27
3 changed files with 6 additions and 4 deletions

View File

@ -494,6 +494,7 @@ impl super::Adapter {
private_caps,
workarounds,
shading_language_version,
max_texture_size,
}),
},
info: Self::make_info(vendor, renderer),
@ -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,

View File

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

View File

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