diff --git a/naga/src/back/glsl/features.rs b/naga/src/back/glsl/features.rs index 6b5956973..b9cd1245e 100644 --- a/naga/src/back/glsl/features.rs +++ b/naga/src/back/glsl/features.rs @@ -124,7 +124,7 @@ impl FeaturesManager { check_feature!(CLIP_DISTANCE, 130, 300 /* with extension */); check_feature!(CULL_DISTANCE, 450, 300 /* with extension */); check_feature!(SAMPLE_VARIABLES, 400, 300); - check_feature!(DYNAMIC_ARRAY_SIZE, 430, 310); + check_feature!(DYNAMIC_ARRAY_SIZE, 400 /* with extension */, 310); check_feature!(DUAL_SOURCE_BLENDING, 330, 300 /* with extension */); check_feature!(SUBGROUP_OPERATIONS, 430, 310); check_feature!(TEXTURE_ATOMICS, 420, 310); diff --git a/naga/src/back/glsl/mod.rs b/naga/src/back/glsl/mod.rs index 0d0893b3a..87f30d5d4 100644 --- a/naga/src/back/glsl/mod.rs +++ b/naga/src/back/glsl/mod.rs @@ -226,7 +226,8 @@ impl Version { } fn supports_std430_layout(&self) -> bool { - *self >= Version::Desktop(430) || *self >= Version::new_gles(310) + // std430 is available from 400 via GL_ARB_shader_storage_buffer_object. + *self >= Version::Desktop(400) || *self >= Version::new_gles(310) } fn supports_fma_function(&self) -> bool { diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index f2c4db8df..c2628ae43 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -311,11 +311,10 @@ impl super::Adapter { es_supported || full_supported }; - // Naga won't let you emit storage buffers at versions below this, so - // we currently can't support GL_ARB_shader_storage_buffer_object. - let supports_storage = supported((3, 1), (4, 3)); - // Same with compute shaders and GL_ARB_compute_shader - let supports_compute = supported((3, 1), (4, 3)); + let supports_storage = + supported((3, 1), (4, 3)) || extensions.contains("GL_ARB_shader_storage_buffer_object"); + let supports_compute = + supported((3, 1), (4, 3)) || extensions.contains("GL_ARB_compute_shader"); let supports_work_group_params = supports_compute; // ANGLE provides renderer strings like: "ANGLE (Apple, Apple M1 Pro, OpenGL 4.1)"