mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
GLES 3.0 fix (#2078)
This commit is contained in:
parent
8e7dee5282
commit
c3d9ad4a93
@ -410,6 +410,10 @@ impl crate::Device<super::Api> for super::Device {
|
||||
.shared
|
||||
.workarounds
|
||||
.contains(super::Workarounds::EMULATE_BUFFER_MAP)
|
||||
|| !self
|
||||
.shared
|
||||
.private_caps
|
||||
.contains(super::PrivateCapabilities::BUFFER_ALLOCATION)
|
||||
{
|
||||
let mut buf = vec![0; buffer.size as usize];
|
||||
let ptr = buf.as_mut_ptr();
|
||||
|
@ -699,8 +699,7 @@ impl Limits {
|
||||
|
||||
/// These default limits are guarenteed to be compatible with GLES3, and D3D11, and WebGL2
|
||||
pub fn downlevel_webgl2_defaults() -> Self {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
let defaults = Self {
|
||||
Self {
|
||||
max_storage_buffers_per_shader_stage: 0,
|
||||
max_storage_textures_per_shader_stage: 0,
|
||||
max_dynamic_storage_buffers_per_pipeline_layout: 0,
|
||||
@ -709,12 +708,7 @@ impl Limits {
|
||||
|
||||
// Most of the values should be the same as the downlevel defaults
|
||||
..Self::downlevel_defaults()
|
||||
};
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
let defaults = Self::downlevel_defaults();
|
||||
|
||||
defaults
|
||||
}
|
||||
}
|
||||
|
||||
/// Modify the current limits to use the resolution limits of the other.
|
||||
|
Loading…
Reference in New Issue
Block a user