OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrGLAssembleInterface.h" | 10 #include "GrGLAssembleInterface.h" |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 GET_PROC_SUFFIX(BindFragmentInputLocation, CHROMIUM); | 772 GET_PROC_SUFFIX(BindFragmentInputLocation, CHROMIUM); |
773 } | 773 } |
774 | 774 |
775 if (extensions.has("GL_NV_framebuffer_mixed_samples")) { | 775 if (extensions.has("GL_NV_framebuffer_mixed_samples")) { |
776 GET_PROC_SUFFIX(CoverageModulation, NV); | 776 GET_PROC_SUFFIX(CoverageModulation, NV); |
777 } | 777 } |
778 if (extensions.has("GL_CHROMIUM_framebuffer_mixed_samples")) { | 778 if (extensions.has("GL_CHROMIUM_framebuffer_mixed_samples")) { |
779 GET_PROC_SUFFIX(CoverageModulation, CHROMIUM); | 779 GET_PROC_SUFFIX(CoverageModulation, CHROMIUM); |
780 } | 780 } |
781 | 781 |
782 if (version >= GR_GL_VER(3,0) || extensions.has("GL_EXT_draw_instanced")) { | 782 if (version >= GR_GL_VER(3,0)) { |
783 GET_PROC(DrawArraysInstanced); | 783 GET_PROC(DrawArraysInstanced); |
784 GET_PROC(DrawElementsInstanced); | 784 GET_PROC(DrawElementsInstanced); |
| 785 } else if (extensions.has("GL_EXT_draw_instanced")) { |
| 786 GET_PROC_SUFFIX(DrawArraysInstanced, EXT); |
| 787 GET_PROC_SUFFIX(DrawElementsInstanced, EXT); |
785 } | 788 } |
786 | 789 |
787 if (version >= GR_GL_VER(3,0) || extensions.has("GL_EXT_instanced_arrays"))
{ | 790 if (version >= GR_GL_VER(3,0)) { |
788 GET_PROC(VertexAttribDivisor); | 791 GET_PROC(VertexAttribDivisor); |
| 792 } else if (extensions.has("GL_EXT_instanced_arrays")) { |
| 793 GET_PROC_SUFFIX(VertexAttribDivisor, EXT); |
789 } | 794 } |
790 | 795 |
791 if (extensions.has("GL_NV_bindless_texture")) { | 796 if (extensions.has("GL_NV_bindless_texture")) { |
792 GET_PROC_SUFFIX(GetTextureHandle, NV); | 797 GET_PROC_SUFFIX(GetTextureHandle, NV); |
793 GET_PROC_SUFFIX(GetTextureSamplerHandle, NV); | 798 GET_PROC_SUFFIX(GetTextureSamplerHandle, NV); |
794 GET_PROC_SUFFIX(MakeTextureHandleResident, NV); | 799 GET_PROC_SUFFIX(MakeTextureHandleResident, NV); |
795 GET_PROC_SUFFIX(MakeTextureHandleNonResident, NV); | 800 GET_PROC_SUFFIX(MakeTextureHandleNonResident, NV); |
796 GET_PROC_SUFFIX(GetImageHandle, NV); | 801 GET_PROC_SUFFIX(GetImageHandle, NV); |
797 GET_PROC_SUFFIX(MakeImageHandleResident, NV); | 802 GET_PROC_SUFFIX(MakeImageHandleResident, NV); |
798 GET_PROC_SUFFIX(MakeImageHandleNonResident, NV); | 803 GET_PROC_SUFFIX(MakeImageHandleNonResident, NV); |
(...skipping 30 matching lines...) Expand all Loading... |
829 if (extensions.has("EGL_KHR_image") || extensions.has("EGL_KHR_image_base"))
{ | 834 if (extensions.has("EGL_KHR_image") || extensions.has("EGL_KHR_image_base"))
{ |
830 GET_EGL_PROC_SUFFIX(CreateImage, KHR); | 835 GET_EGL_PROC_SUFFIX(CreateImage, KHR); |
831 GET_EGL_PROC_SUFFIX(DestroyImage, KHR); | 836 GET_EGL_PROC_SUFFIX(DestroyImage, KHR); |
832 } | 837 } |
833 | 838 |
834 interface->fStandard = kGLES_GrGLStandard; | 839 interface->fStandard = kGLES_GrGLStandard; |
835 interface->fExtensions.swap(&extensions); | 840 interface->fExtensions.swap(&extensions); |
836 | 841 |
837 return interface; | 842 return interface; |
838 } | 843 } |
OLD | NEW |