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

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, 12 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) && 295 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) &&
296 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration; 296 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration;
297 } 297 }
298 else { 298 else {
299 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended"); 299 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended");
300 300
301 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) || 301 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) ||
302 ctxInfo.hasExtension("GL_OES_standard_derivatives"); 302 ctxInfo.hasExtension("GL_OES_standard_derivatives");
303 } 303 }
304 304
305 if (ctxInfo.hasExtension("GL_EXT_shader_pixel_local_storage")) {
306 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
307 GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT,
308 &glslCaps->fPixelLocalStorageSize);
309 }
310 else {
311 glslCaps->fPixelLocalStorageSize = 0;
312 }
313
305 /************************************************************************** 314 /**************************************************************************
306 * GrCaps fields 315 * GrCaps fields
307 **************************************************************************/ 316 **************************************************************************/
308 317
309 // We need dual source blending and the ability to disable multisample in or der to support mixed 318 // We need dual source blending and the ability to disable multisample in or der to support mixed
310 // samples in every corner case. 319 // samples in every corner case.
311 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) { 320 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) {
312 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam ples") || 321 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam ples") ||
313 ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_mixed_samples"); 322 ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_mixed_samples");
314 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa mples. 323 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa mples.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { 545 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) {
537 GrGLStandard standard = ctxInfo.standard(); 546 GrGLStandard standard = ctxInfo.standard();
538 GrGLVersion version = ctxInfo.version(); 547 GrGLVersion version = ctxInfo.version();
539 548
540 /************************************************************************** 549 /**************************************************************************
541 * Caps specific to GrGLSLCaps 550 * Caps specific to GrGLSLCaps
542 **************************************************************************/ 551 **************************************************************************/
543 552
544 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 553 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
545 glslCaps->fGLSLGeneration = ctxInfo.glslGeneration(); 554 glslCaps->fGLSLGeneration = ctxInfo.glslGeneration();
546
547 if (kGLES_GrGLStandard == standard) { 555 if (kGLES_GrGLStandard == standard) {
548 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { 556 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
549 glslCaps->fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); 557 glslCaps->fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0));
550 glslCaps->fFBFetchSupport = true; 558 glslCaps->fFBFetchSupport = true;
551 glslCaps->fFBFetchColorName = "gl_LastFragData[0]"; 559 glslCaps->fFBFetchColorName = "gl_LastFragData[0]";
552 glslCaps->fFBFetchExtensionString = "GL_EXT_shader_framebuffer_fetch "; 560 glslCaps->fFBFetchExtensionString = "GL_EXT_shader_framebuffer_fetch ";
553 } 561 }
554 else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) { 562 else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) {
555 // Actually, we haven't seen an ES3.0 device with this extension yet , so we don't know 563 // Actually, we haven't seen an ES3.0 device with this extension yet , so we don't know
556 glslCaps->fFBFetchNeedsCustomOutput = false; 564 glslCaps->fFBFetchNeedsCustomOutput = false;
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 fConfigTable[i].fFormats.fSizedInternalFormat); 1531 fConfigTable[i].fFormats.fSizedInternalFormat);
1524 SkASSERT(defaultEntry.fExternalFormat != fConfigTable[i].fFormats.fExter nalFormat); 1532 SkASSERT(defaultEntry.fExternalFormat != fConfigTable[i].fFormats.fExter nalFormat);
1525 SkASSERT(defaultEntry.fExternalType != fConfigTable[i].fFormats.fExterna lType); 1533 SkASSERT(defaultEntry.fExternalType != fConfigTable[i].fFormats.fExterna lType);
1526 } 1534 }
1527 #endif 1535 #endif
1528 } 1536 }
1529 1537
1530 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1538 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
1531 1539
1532 1540
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698