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

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

Issue 2384463003: Add fence support for TransferBuffers (Closed)
Patch Set: Add test code Created 4 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') | src/gpu/gl/GrGLDefines.h » ('j') | 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 2012 Google Inc. 2 * Copyright 2012 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 "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 543
544 if (kGL_GrGLStandard == standard) { 544 if (kGL_GrGLStandard == standard) {
545 if ((version >= GR_GL_VER(4, 0) || ctxInfo.hasExtension("GL_ARB_sample_s hading")) && 545 if ((version >= GR_GL_VER(4, 0) || ctxInfo.hasExtension("GL_ARB_sample_s hading")) &&
546 ctxInfo.vendor() != kIntel_GrGLVendor) { 546 ctxInfo.vendor() != kIntel_GrGLVendor) {
547 fSampleShadingSupport = true; 547 fSampleShadingSupport = true;
548 } 548 }
549 } else if (ctxInfo.hasExtension("GL_OES_sample_shading")) { 549 } else if (ctxInfo.hasExtension("GL_OES_sample_shading")) {
550 fSampleShadingSupport = true; 550 fSampleShadingSupport = true;
551 } 551 }
552 552
553 // TODO: support CHROMIUM_sync_point and maybe KHR_fence_sync
554 if (kGL_GrGLStandard == standard) {
555 if (version >= GR_GL_VER(3, 2) || ctxInfo.hasExtension("GL_ARB_sync")) {
556 fFenceSyncSupport = true;
557 }
558 } else if (version >= GR_GL_VER(3, 0)) {
559 fFenceSyncSupport = true;
560 }
561
553 // We support manual mip-map generation (via iterative downsampling draw cal ls). This fixes 562 // We support manual mip-map generation (via iterative downsampling draw cal ls). This fixes
554 // bugs on some cards/drivers that produce incorrect mip-maps for sRGB textu res when using 563 // bugs on some cards/drivers that produce incorrect mip-maps for sRGB textu res when using
555 // glGenerateMipmap. Our implementation requires mip-level sampling control. Additionally, 564 // glGenerateMipmap. Our implementation requires mip-level sampling control. Additionally,
556 // it can be much slower (especially on mobile GPUs), so we opt-in only when necessary: 565 // it can be much slower (especially on mobile GPUs), so we opt-in only when necessary:
557 if (fMipMapLevelAndLodControlSupport && 566 if (fMipMapLevelAndLodControlSupport &&
558 (contextOptions.fDoManualMipmapping || 567 (contextOptions.fDoManualMipmapping ||
559 (kIntel_GrGLVendor == ctxInfo.vendor()) || 568 (kIntel_GrGLVendor == ctxInfo.vendor()) ||
560 (kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) || 569 (kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) ||
561 (kATI_GrGLVendor == ctxInfo.vendor()))) { 570 (kATI_GrGLVendor == ctxInfo.vendor()))) {
562 fDoManualMipmapping = true; 571 fDoManualMipmapping = true;
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { 1970 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
1962 if (options.fEnableInstancedRendering) { 1971 if (options.fEnableInstancedRendering) {
1963 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is); 1972 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is);
1964 #ifndef SK_BUILD_FOR_MAC 1973 #ifndef SK_BUILD_FOR_MAC
1965 // OS X doesn't seem to write correctly to floating point textures when using 1974 // OS X doesn't seem to write correctly to floating point textures when using
1966 // glDraw*Indirect, regardless of the underlying GPU. 1975 // glDraw*Indirect, regardless of the underlying GPU.
1967 fAvoidInstancedDrawsToFPTargets = true; 1976 fAvoidInstancedDrawsToFPTargets = true;
1968 #endif 1977 #endif
1969 } 1978 }
1970 } 1979 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698