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

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

Issue 1784063003: Add caps and GL API for buffer texture (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_precision
Patch Set: Created 4 years, 9 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/GrGLCreateNullInterface.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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 } 710 }
711 711
712 if (glslCaps->fExternalTextureSupport) { 712 if (glslCaps->fExternalTextureSupport) {
713 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { 713 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) {
714 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern al"; 714 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern al";
715 } else { 715 } else {
716 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern al_essl3"; 716 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern al_essl3";
717 } 717 }
718 } 718 }
719 719
720 if (kGL_GrGLStandard == standard) {
721 glslCaps->fBufferTextureSupport = ctxInfo.version() > GR_GL_VER(3, 1) &&
722 ctxInfo.glslGeneration() >= k330_GrGLS LGeneration;
723 } else {
724 if (ctxInfo.version() > GR_GL_VER(3, 2) &&
725 ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
726 glslCaps->fBufferTextureSupport = true;
727 } else if (ctxInfo.hasExtension("GL_OES_texture_buffer")) {
728 glslCaps->fBufferTextureSupport = true;
729 glslCaps->fBufferTextureExtensionString = "GL_OES_texture_buffer";
730 } else if (ctxInfo.hasExtension("GL_EXT_texture_buffer")) {
731 glslCaps->fBufferTextureSupport = true;
732 glslCaps->fBufferTextureExtensionString = "GL_EXT_texture_buffer";
733 }
734 }
735
720 // The Tegra3 compiler will sometimes never return if we have min(abs(x), 1. 0), so we must do 736 // The Tegra3 compiler will sometimes never return if we have min(abs(x), 1. 0), so we must do
721 // the abs first in a separate expression. 737 // the abs first in a separate expression.
722 if (kTegra3_GrGLRenderer == ctxInfo.renderer()) { 738 if (kTegra3_GrGLRenderer == ctxInfo.renderer()) {
723 glslCaps->fCanUseMinAndAbsTogether = false; 739 glslCaps->fCanUseMinAndAbsTogether = false;
724 } 740 }
725 741
726 // On Intel GPU there is an issue where it reads the second argument to atan "- %s.x" as an int 742 // On Intel GPU there is an issue where it reads the second argument to atan "- %s.x" as an int
727 // thus must us -1.0 * %s.x to work correctly 743 // thus must us -1.0 * %s.x to work correctly
728 if (kIntel_GrGLVendor == ctxInfo.vendor()) { 744 if (kIntel_GrGLVendor == ctxInfo.vendor()) {
729 glslCaps->fMustForceNegatedAtanParamToFloat = true; 745 glslCaps->fMustForceNegatedAtanParamToFloat = true;
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1827 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1812 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1828 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1813 fConfigTable[i].fFormats.fExternalFormat[j]); 1829 fConfigTable[i].fFormats.fExternalFormat[j]);
1814 } 1830 }
1815 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1831 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1816 } 1832 }
1817 #endif 1833 #endif
1818 } 1834 }
1819 1835
1820 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1836 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698