diff options
author | cdalton <cdalton@nvidia.com> | 2016-02-05 10:09:51 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-05 10:09:51 -0800 |
commit | 06604b95622359640a1c2028b885646deda28d52 (patch) | |
tree | 5ef3c819b4039da55a0a915921243fa9e1e5f662 /src/gpu/gl/GrGLInterface.cpp | |
parent | af8bc7d7a4fb1fbbc15bb0881a360ff0d7551ea2 (diff) |
Add GL indirect drawing APIs
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666803002
Review URL: https://codereview.chromium.org/1666803002
Diffstat (limited to 'src/gpu/gl/GrGLInterface.cpp')
-rw-r--r-- | src/gpu/gl/GrGLInterface.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index b8d7db6b2e..925f081b34 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -579,6 +579,22 @@ bool GrGLInterface::validate() const { } } + if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) || + (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) { + if (NULL == fFunctions.fDrawArraysIndirect || + NULL == fFunctions.fDrawElementsIndirect) { + RETURN_FALSE_INTERFACE + } + } + + if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) || + (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_EXT_multi_draw_indirect"))) { + if (NULL == fFunctions.fMultiDrawArraysIndirect || + NULL == fFunctions.fMultiDrawElementsIndirect) { + RETURN_FALSE_INTERFACE + } + } + if (fExtensions.has("GL_NV_bindless_texture")) { if (nullptr == fFunctions.fGetTextureHandle || nullptr == fFunctions.fGetTextureSamplerHandle || |