Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: src/gpu/gl/GrGLInterface.cpp

Issue 1409053003: skia: Make the validate match interface for *_draw_instanced (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698