OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "gl/GrGLAssembleInterface.h" | 9 #include "gl/GrGLAssembleInterface.h" |
10 #include "GrGLUtil.h" | 10 #include "GrGLUtil.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 GET_PROC(ShaderSource); | 200 GET_PROC(ShaderSource); |
201 GET_PROC(StencilFunc); | 201 GET_PROC(StencilFunc); |
202 GET_PROC(StencilFuncSeparate); | 202 GET_PROC(StencilFuncSeparate); |
203 GET_PROC(StencilMask); | 203 GET_PROC(StencilMask); |
204 GET_PROC(StencilMaskSeparate); | 204 GET_PROC(StencilMaskSeparate); |
205 GET_PROC(StencilOp); | 205 GET_PROC(StencilOp); |
206 GET_PROC(StencilOpSeparate); | 206 GET_PROC(StencilOpSeparate); |
207 if (glVer >= GR_GL_VER(3,1)) { | 207 if (glVer >= GR_GL_VER(3,1)) { |
208 GET_PROC(TexBuffer); | 208 GET_PROC(TexBuffer); |
209 } | 209 } |
| 210 if (glVer >= GR_GL_VER(4,3)) { |
| 211 GET_PROC(TexBufferRange); |
| 212 } |
210 GET_PROC(TexImage2D); | 213 GET_PROC(TexImage2D); |
211 GET_PROC(TexParameteri); | 214 GET_PROC(TexParameteri); |
212 GET_PROC(TexParameteriv); | 215 GET_PROC(TexParameteriv); |
213 if (glVer >= GR_GL_VER(4,2) || extensions.has("GL_ARB_texture_storage")) { | 216 if (glVer >= GR_GL_VER(4,2) || extensions.has("GL_ARB_texture_storage")) { |
214 GET_PROC(TexStorage2D); | 217 GET_PROC(TexStorage2D); |
215 } else if (extensions.has("GL_EXT_texture_storage")) { | 218 } else if (extensions.has("GL_EXT_texture_storage")) { |
216 GET_PROC_SUFFIX(TexStorage2D, EXT); | 219 GET_PROC_SUFFIX(TexStorage2D, EXT); |
217 } | 220 } |
218 GET_PROC(TexSubImage2D); | 221 GET_PROC(TexSubImage2D); |
219 if (glVer >= GR_GL_VER(4,5) || extensions.has("GL_ARB_texture_barrier")) { | 222 if (glVer >= GR_GL_VER(4,5) || extensions.has("GL_ARB_texture_barrier")) { |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 GET_PROC(ShaderSource); | 651 GET_PROC(ShaderSource); |
649 GET_PROC(StencilFunc); | 652 GET_PROC(StencilFunc); |
650 GET_PROC(StencilFuncSeparate); | 653 GET_PROC(StencilFuncSeparate); |
651 GET_PROC(StencilMask); | 654 GET_PROC(StencilMask); |
652 GET_PROC(StencilMaskSeparate); | 655 GET_PROC(StencilMaskSeparate); |
653 GET_PROC(StencilOp); | 656 GET_PROC(StencilOp); |
654 GET_PROC(StencilOpSeparate); | 657 GET_PROC(StencilOpSeparate); |
655 | 658 |
656 if (version >= GR_GL_VER(3,2)) { | 659 if (version >= GR_GL_VER(3,2)) { |
657 GET_PROC(TexBuffer); | 660 GET_PROC(TexBuffer); |
| 661 GET_PROC(TexBufferRange); |
658 } else if (extensions.has("GL_OES_texture_buffer")) { | 662 } else if (extensions.has("GL_OES_texture_buffer")) { |
659 GET_PROC_SUFFIX(TexBuffer, OES); | 663 GET_PROC_SUFFIX(TexBuffer, OES); |
| 664 GET_PROC_SUFFIX(TexBufferRange, OES); |
660 } else if (extensions.has("GL_EXT_texture_buffer")) { | 665 } else if (extensions.has("GL_EXT_texture_buffer")) { |
661 GET_PROC_SUFFIX(TexBuffer, EXT); | 666 GET_PROC_SUFFIX(TexBuffer, EXT); |
| 667 GET_PROC_SUFFIX(TexBufferRange, EXT); |
662 } | 668 } |
663 | 669 |
664 GET_PROC(TexImage2D); | 670 GET_PROC(TexImage2D); |
665 GET_PROC(TexParameteri); | 671 GET_PROC(TexParameteri); |
666 GET_PROC(TexParameteriv); | 672 GET_PROC(TexParameteriv); |
667 GET_PROC(TexSubImage2D); | 673 GET_PROC(TexSubImage2D); |
668 | 674 |
669 if (version >= GR_GL_VER(3,0)) { | 675 if (version >= GR_GL_VER(3,0)) { |
670 GET_PROC(TexStorage2D); | 676 GET_PROC(TexStorage2D); |
671 } else { | 677 } else { |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 | 904 |
899 if (extensions.has("GL_OES_sample_shading")) { | 905 if (extensions.has("GL_OES_sample_shading")) { |
900 GET_PROC_SUFFIX(MinSampleShading, OES); | 906 GET_PROC_SUFFIX(MinSampleShading, OES); |
901 } | 907 } |
902 | 908 |
903 interface->fStandard = kGLES_GrGLStandard; | 909 interface->fStandard = kGLES_GrGLStandard; |
904 interface->fExtensions.swap(&extensions); | 910 interface->fExtensions.swap(&extensions); |
905 | 911 |
906 return interface; | 912 return interface; |
907 } | 913 } |
OLD | NEW |