OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
10 #include "gl/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 RETURN_FALSE_INTERFACE | 537 RETURN_FALSE_INTERFACE |
538 } | 538 } |
539 } | 539 } |
540 | 540 |
541 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { | 541 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { |
542 if (nullptr == fFunctions.fCoverageModulation) { | 542 if (nullptr == fFunctions.fCoverageModulation) { |
543 RETURN_FALSE_INTERFACE | 543 RETURN_FALSE_INTERFACE |
544 } | 544 } |
545 } | 545 } |
546 | 546 |
547 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1)) || | 547 if (kGL_GrGLStandard == fStandard) { |
548 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) || | 548 if (glVer >= GR_GL_VER(3,1) || |
549 fExtensions.has("GL_ARB_draw_instanced") || | 549 fExtensions.has("GL_EXT_draw_instanced") || fExtensions.has("GL_ARB_
draw_instanced")) { |
550 fExtensions.has("GL_EXT_draw_instanced")) { | 550 if (nullptr == fFunctions.fDrawArraysInstanced || |
551 if (nullptr == fFunctions.fDrawArraysInstanced || | 551 nullptr == fFunctions.fDrawElementsInstanced) { |
552 nullptr == fFunctions.fDrawElementsInstanced) { | 552 RETURN_FALSE_INTERFACE |
553 RETURN_FALSE_INTERFACE | 553 } |
554 } | 554 } |
| 555 } else if (kGLES_GrGLStandard == fStandard) { |
| 556 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_draw_instanced"))
{ |
| 557 if (nullptr == fFunctions.fDrawArraysInstanced || |
| 558 nullptr == fFunctions.fDrawElementsInstanced) { |
| 559 RETURN_FALSE_INTERFACE |
| 560 } |
| 561 } |
555 } | 562 } |
556 | 563 |
557 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,2)) || | 564 if (kGL_GrGLStandard == fStandard) { |
558 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) || | 565 if (glVer >= GR_GL_VER(3,2) || fExtensions.has("GL_ARB_instanced_arrays"
)) { |
559 fExtensions.has("GL_ARB_instanced_arrays") || | 566 if (nullptr == fFunctions.fVertexAttribDivisor) { |
560 fExtensions.has("GL_EXT_instanced_arrays")) { | 567 RETURN_FALSE_INTERFACE |
561 if (nullptr == fFunctions.fVertexAttribDivisor) { | 568 } |
562 RETURN_FALSE_INTERFACE | 569 } |
563 } | 570 } else if (kGLES_GrGLStandard == fStandard) { |
| 571 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_instanced_arrays"
)) { |
| 572 if (nullptr == fFunctions.fVertexAttribDivisor) { |
| 573 RETURN_FALSE_INTERFACE |
| 574 } |
| 575 } |
564 } | 576 } |
565 | 577 |
566 if (fExtensions.has("GL_NV_bindless_texture")) { | 578 if (fExtensions.has("GL_NV_bindless_texture")) { |
567 if (nullptr == fFunctions.fGetTextureHandle || | 579 if (nullptr == fFunctions.fGetTextureHandle || |
568 nullptr == fFunctions.fGetTextureSamplerHandle || | 580 nullptr == fFunctions.fGetTextureSamplerHandle || |
569 nullptr == fFunctions.fMakeTextureHandleResident || | 581 nullptr == fFunctions.fMakeTextureHandleResident || |
570 nullptr == fFunctions.fMakeTextureHandleNonResident || | 582 nullptr == fFunctions.fMakeTextureHandleNonResident || |
571 nullptr == fFunctions.fGetImageHandle || | 583 nullptr == fFunctions.fGetImageHandle || |
572 nullptr == fFunctions.fMakeImageHandleResident || | 584 nullptr == fFunctions.fMakeImageHandleResident || |
573 nullptr == fFunctions.fMakeImageHandleNonResident || | 585 nullptr == fFunctions.fMakeImageHandleNonResident || |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 nullptr == fFunctions.fGetDebugMessageLog || | 727 nullptr == fFunctions.fGetDebugMessageLog || |
716 nullptr == fFunctions.fPushDebugGroup || | 728 nullptr == fFunctions.fPushDebugGroup || |
717 nullptr == fFunctions.fPopDebugGroup || | 729 nullptr == fFunctions.fPopDebugGroup || |
718 nullptr == fFunctions.fObjectLabel) { | 730 nullptr == fFunctions.fObjectLabel) { |
719 RETURN_FALSE_INTERFACE | 731 RETURN_FALSE_INTERFACE |
720 } | 732 } |
721 } | 733 } |
722 | 734 |
723 return true; | 735 return true; |
724 } | 736 } |
OLD | NEW |