Support SSBOs and compute shaders when provided through GL extensions (#9169)

This commit is contained in:
John Tur authored and GitHub committed 2026-03-07 21:17:12 -05:00
1 parent 0ab6edd6a3
commit 74baec71b4
3 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -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);
+2 -1
View File
@@ -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 {
+4 -5
View File
@@ -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)"