mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
guarantee DownlevelFlags::COMPUTE_SHADERS when DownlevelFlags::INDIRECT_EXECUTION is enabled
This commit is contained in:
1 parent
a2878db5f2
commit
2ab3b6da8d
2 files changed
+5
-2
No files matched your search
@@ -377,8 +377,9 @@ impl super::Adapter {
|
||||
} else {
|
||||
vertex_shader_storage_textures.min(fragment_shader_storage_textures)
|
||||
};
|
||||
let indirect_execution =
|
||||
supported((3, 1), (4, 3)) || extensions.contains("GL_ARB_multi_draw_indirect");
|
||||
// NOTE: GL_ARB_compute_shader adds support for indirect dispatch
|
||||
let indirect_execution = supported((3, 1), (4, 3))
|
||||
|| (extensions.contains("GL_ARB_draw_indirect") && supports_compute);
|
||||
|
||||
let mut downlevel_flags = wgt::DownlevelFlags::empty()
|
||||
| wgt::DownlevelFlags::NON_POWER_OF_TWO_MIPMAPPED_TEXTURES
|
||||
|
||||
@@ -965,6 +965,8 @@ bitflags::bitflags! {
|
||||
const FRAGMENT_WRITABLE_STORAGE = 1 << 1;
|
||||
/// Supports indirect drawing and dispatching.
|
||||
///
|
||||
/// [`Self::COMPUTE_SHADERS`] must be present for this flag.
|
||||
///
|
||||
/// WebGL2, GLES 3.0, and Metal on Apple1/Apple2 GPUs do not support indirect.
|
||||
const INDIRECT_EXECUTION = 1 << 2;
|
||||
/// Supports non-zero `base_vertex` parameter to direct indexed draw calls.
|
||||
|
||||
Reference in new issue
Block a user