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

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

Issue 1541903002: added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) && 264 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) &&
265 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration; 265 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration;
266 } 266 }
267 else { 267 else {
268 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended"); 268 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended");
269 269
270 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) || 270 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) ||
271 ctxInfo.hasExtension("GL_OES_standard_derivatives"); 271 ctxInfo.hasExtension("GL_OES_standard_derivatives");
272 } 272 }
273 273
274 if (ctxInfo.hasExtension("GL_EXT_shader_pixel_local_storage")) {
275 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
bsalomon 2016/01/13 19:15:34 Define in GrGLDefines.h, nix the _EXT, prefix GR_.
276 GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT,
277 &glslCaps->fPixelLocalStorageSize);
278 }
279 else {
280 glslCaps->fPixelLocalStorageSize = 0;
281 }
282
274 /************************************************************************** 283 /**************************************************************************
275 * GrCaps fields 284 * GrCaps fields
276 **************************************************************************/ 285 **************************************************************************/
277 286
278 // We need dual source blending and the ability to disable multisample in or der to support mixed 287 // We need dual source blending and the ability to disable multisample in or der to support mixed
279 // samples in every corner case. 288 // samples in every corner case.
280 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) { 289 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) {
281 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam ples") || 290 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam ples") ||
282 ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_mixed_samples"); 291 ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_mixed_samples");
283 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa mples. 292 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa mples.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { 516 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) {
508 GrGLStandard standard = ctxInfo.standard(); 517 GrGLStandard standard = ctxInfo.standard();
509 GrGLVersion version = ctxInfo.version(); 518 GrGLVersion version = ctxInfo.version();
510 519
511 /************************************************************************** 520 /**************************************************************************
512 * Caps specific to GrGLSLCaps 521 * Caps specific to GrGLSLCaps
513 **************************************************************************/ 522 **************************************************************************/
514 523
515 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 524 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
516 glslCaps->fGLSLGeneration = ctxInfo.glslGeneration(); 525 glslCaps->fGLSLGeneration = ctxInfo.glslGeneration();
517
518 if (kGLES_GrGLStandard == standard) { 526 if (kGLES_GrGLStandard == standard) {
519 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { 527 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
520 glslCaps->fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); 528 glslCaps->fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0));
521 glslCaps->fFBFetchSupport = true; 529 glslCaps->fFBFetchSupport = true;
522 glslCaps->fFBFetchColorName = "gl_LastFragData[0]"; 530 glslCaps->fFBFetchColorName = "gl_LastFragData[0]";
523 glslCaps->fFBFetchExtensionString = "GL_EXT_shader_framebuffer_fetch "; 531 glslCaps->fFBFetchExtensionString = "GL_EXT_shader_framebuffer_fetch ";
524 } 532 }
525 else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) { 533 else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) {
526 // Actually, we haven't seen an ES3.0 device with this extension yet , so we don't know 534 // Actually, we haven't seen an ES3.0 device with this extension yet , so we don't know
527 glslCaps->fFBFetchNeedsCustomOutput = false; 535 glslCaps->fFBFetchNeedsCustomOutput = false;
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1580 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1573 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1581 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1574 fConfigTable[i].fFormats.fExternalFormat[j]); 1582 fConfigTable[i].fFormats.fExternalFormat[j]);
1575 } 1583 }
1576 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1584 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1577 } 1585 }
1578 #endif 1586 #endif
1579 } 1587 }
1580 1588
1581 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1589 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698