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

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

Issue 993363002: GrGLInterface: Add support for NV_framebuffer_mixed_samples (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase and missing validation Created 5 years, 8 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/GrGLCaps.h ('k') | src/gpu/gl/GrGLInterface.cpp » ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 fVertexArrayObjectSupport = false; 47 fVertexArrayObjectSupport = false;
48 fES2CompatibilitySupport = false; 48 fES2CompatibilitySupport = false;
49 fUseNonVBOVertexAndIndexDynamicData = false; 49 fUseNonVBOVertexAndIndexDynamicData = false;
50 fIsCoreProfile = false; 50 fIsCoreProfile = false;
51 fFullClearIsFree = false; 51 fFullClearIsFree = false;
52 fDropsTileOnZeroDivide = false; 52 fDropsTileOnZeroDivide = false;
53 fFBFetchSupport = false; 53 fFBFetchSupport = false;
54 fFBFetchNeedsCustomOutput = false; 54 fFBFetchNeedsCustomOutput = false;
55 fFBFetchColorName = NULL; 55 fFBFetchColorName = NULL;
56 fFBFetchExtensionString = NULL; 56 fFBFetchExtensionString = NULL;
57 fFBMixedSamplesSupport = false;
57 58
58 fReadPixelsSupportedCache.reset(); 59 fReadPixelsSupportedCache.reset();
59 } 60 }
60 61
61 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() { 62 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() {
62 *this = caps; 63 *this = caps;
63 } 64 }
64 65
65 GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) { 66 GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) {
66 INHERITED::operator=(caps); 67 INHERITED::operator=(caps);
(...skipping 25 matching lines...) Expand all
92 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport; 93 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport;
93 fES2CompatibilitySupport = caps.fES2CompatibilitySupport; 94 fES2CompatibilitySupport = caps.fES2CompatibilitySupport;
94 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta; 95 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta;
95 fIsCoreProfile = caps.fIsCoreProfile; 96 fIsCoreProfile = caps.fIsCoreProfile;
96 fFullClearIsFree = caps.fFullClearIsFree; 97 fFullClearIsFree = caps.fFullClearIsFree;
97 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide; 98 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide;
98 fFBFetchSupport = caps.fFBFetchSupport; 99 fFBFetchSupport = caps.fFBFetchSupport;
99 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput; 100 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput;
100 fFBFetchColorName = caps.fFBFetchColorName; 101 fFBFetchColorName = caps.fFBFetchColorName;
101 fFBFetchExtensionString = caps.fFBFetchExtensionString; 102 fFBFetchExtensionString = caps.fFBFetchExtensionString;
103 fFBMixedSamplesSupport = caps.fFBMixedSamplesSupport;
102 104
103 return *this; 105 return *this;
104 } 106 }
105 107
106 bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { 108 bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
107 109
108 this->reset(); 110 this->reset();
109 if (!ctxInfo.isInitialized()) { 111 if (!ctxInfo.isInitialized()) {
110 return false; 112 return false;
111 } 113 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 kL egacy_NvprSupport; 366 kL egacy_NvprSupport;
365 } 367 }
366 } else { 368 } else {
367 fPathRenderingSupport = ctxInfo.version() >= GR_GL_VER(3,1); 369 fPathRenderingSupport = ctxInfo.version() >= GR_GL_VER(3,1);
368 fNvprSupport = fPathRenderingSupport ? kNormal_NvprSupport : kNone_N vprSupport; 370 fNvprSupport = fPathRenderingSupport ? kNormal_NvprSupport : kNone_N vprSupport;
369 } 371 }
370 } else { 372 } else {
371 fNvprSupport = kNone_NvprSupport; 373 fNvprSupport = kNone_NvprSupport;
372 } 374 }
373 375
376 fFBMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sampl es");
377
374 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); 378 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker");
375 379
376 // For now these two are equivalent but we could have dst read in shader via some other method 380 // For now these two are equivalent but we could have dst read in shader via some other method
377 fDstReadInShaderSupport = fFBFetchSupport; 381 fDstReadInShaderSupport = fFBFetchSupport;
378 382
379 // Disable scratch texture reuse on Mali and Adreno devices 383 // Disable scratch texture reuse on Mali and Adreno devices
380 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && 384 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() &&
381 kQualcomm_GrGLVendor != ctxInfo.vendor(); 385 kQualcomm_GrGLVendor != ctxInfo.vendor();
382 386
383 // Enable supported shader-related caps 387 // Enable supported shader-related caps
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 1050 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
1047 r.appendf("Fragment coord conventions support: %s\n", 1051 r.appendf("Fragment coord conventions support: %s\n",
1048 (fFragCoordsConventionSupport ? "YES": "NO")); 1052 (fFragCoordsConventionSupport ? "YES": "NO"));
1049 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); 1053 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
1050 r.appendf("Use non-VBO for dynamic data: %s\n", 1054 r.appendf("Use non-VBO for dynamic data: %s\n",
1051 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 1055 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
1052 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); 1056 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO "));
1053 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); 1057 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO"));
1054 return r; 1058 return r;
1055 } 1059 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698