guarantee DownlevelFlags::COMPUTE_SHADERS when DownlevelFlags::INDIRECT_EXECUTION is enabled

This commit is contained in:
teoxoy authored and Teodor Tanasoaia committed 2025-03-26 18:26:31 +00:00
1 parent a2878db5f2
commit 2ab3b6da8d
2 files changed
+5 -2

No files matched your search

+3 -2
View File
@@ -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
+2
View File
@@ -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.