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

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

Issue 1666563003: Add support for GL_EXT_raster_multisample (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove rasterMultisampleSupport Created 4 years, 10 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/GrCaps.cpp ('k') | src/gpu/gl/GrGLGpu.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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && 416 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() &&
417 kQualcomm_GrGLVendor != ctxInfo.vendor(); 417 kQualcomm_GrGLVendor != ctxInfo.vendor();
418 418
419 #if 0 419 #if 0
420 fReuseScratchBuffers = kARM_GrGLVendor != ctxInfo.vendor() && 420 fReuseScratchBuffers = kARM_GrGLVendor != ctxInfo.vendor() &&
421 kQualcomm_GrGLVendor != ctxInfo.vendor(); 421 kQualcomm_GrGLVendor != ctxInfo.vendor();
422 #endif 422 #endif
423 423
424 // initFSAASupport() must have been called before this point 424 // initFSAASupport() must have been called before this point
425 if (GrGLCaps::kES_IMG_MsToTexture_MSFBOType == fMSFBOType) { 425 if (GrGLCaps::kES_IMG_MsToTexture_MSFBOType == fMSFBOType) {
426 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES_IMG, &fMaxColorSampleCount); 426 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES_IMG, &fMaxStencilSampleCount);
427 } else if (GrGLCaps::kNone_MSFBOType != fMSFBOType) { 427 } else if (GrGLCaps::kNone_MSFBOType != fMSFBOType) {
428 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES, &fMaxColorSampleCount); 428 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES, &fMaxStencilSampleCount);
429 } 429 }
430 fMaxStencilSampleCount = fMaxColorSampleCount; 430 // We only have a use for raster multisample if there is coverage modulation from mixed samples.
431 if (fUsesMixedSamples && ctxInfo.hasExtension("GL_EXT_raster_multisample")) {
432 GR_GL_GetIntegerv(gli, GR_GL_MAX_RASTER_SAMPLES, &fMaxRasterSamples);
433 // This is to guard against platforms that may not support as many sampl es for
434 // glRasterSamples as they do for framebuffers.
435 fMaxStencilSampleCount = SkTMin(fMaxStencilSampleCount, fMaxRasterSample s);
436 }
437 fMaxColorSampleCount = fMaxStencilSampleCount;
431 438
432 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || 439 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() ||
433 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || 440 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() ||
434 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { 441 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) {
435 fUseDrawInsteadOfClear = true; 442 fUseDrawInsteadOfClear = true;
436 } 443 }
437 444
438 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { 445 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) {
439 fUseDrawInsteadOfPartialRenderTargetWrite = true; 446 fUseDrawInsteadOfPartialRenderTargetWrite = true;
440 } 447 }
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1642 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1636 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1643 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1637 fConfigTable[i].fFormats.fExternalFormat[j]); 1644 fConfigTable[i].fFormats.fExternalFormat[j]);
1638 } 1645 }
1639 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1646 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1640 } 1647 }
1641 #endif 1648 #endif
1642 } 1649 }
1643 1650
1644 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1651 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698