dawn/native: Add support for feature "indirect-first-instance"

Bug: dawn:1197
Change-Id: I9042b2dc178dfc01201bff55a2f5e43de28d335e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90526
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
This commit is contained in:
Enrico Galli
2022-06-01 06:14:07 +00:00
committed by Dawn LUCI CQ
parent d1eb73419e
commit 1ee244b3d3
9 changed files with 45 additions and 8 deletions

View File

@@ -247,6 +247,15 @@ class Adapter : public AdapterBase {
mSupportedFeatures.EnableFeature(Feature::Depth24UnormStencil8);
}
// Non-zero baseInstance requires at least desktop OpenGL 4.2, and it is not supported in
// OpenGL ES OpenGL:
// https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glDrawElementsIndirect.xhtml
// OpenGL ES:
// https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawElementsIndirect.xhtml
if (mFunctions.IsAtLeastGL(4, 2)) {
mSupportedFeatures.EnableFeature(Feature::IndirectFirstInstance);
}
return {};
}