Skip to content

Commit 20f5b83

Browse files
cwfitzgeraldteoxoy
authored andcommitted
Naga does not let storage buffers or compute happen on old GL versions
1 parent 136edde commit 20f5b83

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ By @cwfitzgerald in [#8609](https://github.com/gfx-rs/wgpu/pull/8609).
245245

246246
- Fix race when downloading texture from compute shader pass. By @SpeedCrash100 in [#8527](https://github.com/gfx-rs/wgpu/pull/8527)
247247
- Fix double window class registration when dynamic libraries are used. By @Azorlogh in [#8548](https://github.com/gfx-rs/wgpu/pull/8548)
248+
- Fix context loss on device initialization on GL3.3-4.1 contexts. By @cwfitzgerald in [#8674](https://github.com/gfx-rs/wgpu/pull/8674).
248249

249250
#### hal
250251

wgpu-hal/src/gles/adapter.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,11 @@ impl super::Adapter {
311311
es_supported || full_supported
312312
};
313313

314-
let supports_storage =
315-
supported((3, 1), (4, 3)) || extensions.contains("GL_ARB_shader_storage_buffer_object");
316-
let supports_compute =
317-
supported((3, 1), (4, 3)) || extensions.contains("GL_ARB_compute_shader");
314+
// Naga won't let you emit storage buffers at versions below this, so
315+
// we currently can't support GL_ARB_shader_storage_buffer_object.
316+
let supports_storage = supported((3, 1), (4, 3));
317+
// Same with compute shaders and GL_ARB_compute_shader
318+
let supports_compute = supported((3, 1), (4, 3));
318319
let supports_work_group_params = supports_compute;
319320

320321
// ANGLE provides renderer strings like: "ANGLE (Apple, Apple M1 Pro, OpenGL 4.1)"

0 commit comments

Comments
 (0)