GLES 3.0 fix (#2078)

This commit is contained in:
Inseok Lee authored and GitHub committed 2021-10-21 16:07:07 +00:00
1 parent 003b83f6ac
commit 82cf1972af
2 files changed
+6 -8

No files matched your search

+4
View File
@@ -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();
+2 -8
View File
@@ -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.