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

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

Issue 2248403003: Fix various issues with framebuffer fetch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 4 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 | « no previous file | src/gpu/glsl/GrGLSLCaps.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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // the abs first in a separate expression. 787 // the abs first in a separate expression.
788 if (kTegra3_GrGLRenderer == ctxInfo.renderer()) { 788 if (kTegra3_GrGLRenderer == ctxInfo.renderer()) {
789 glslCaps->fCanUseMinAndAbsTogether = false; 789 glslCaps->fCanUseMinAndAbsTogether = false;
790 } 790 }
791 791
792 // On Intel GPU there is an issue where it reads the second argument to atan "- %s.x" as an int 792 // On Intel GPU there is an issue where it reads the second argument to atan "- %s.x" as an int
793 // thus must us -1.0 * %s.x to work correctly 793 // thus must us -1.0 * %s.x to work correctly
794 if (kIntel_GrGLVendor == ctxInfo.vendor()) { 794 if (kIntel_GrGLVendor == ctxInfo.vendor()) {
795 glslCaps->fMustForceNegatedAtanParamToFloat = true; 795 glslCaps->fMustForceNegatedAtanParamToFloat = true;
796 } 796 }
797
798 // On Adreno devices with framebuffer fetch support, there is a bug where th ey always return
799 // the original dst color when reading the outColor even after being written to. By using a
800 // local outColor we can work around this bug.
801 if (glslCaps->fFBFetchSupport && kQualcomm_GrGLVendor == ctxInfo.vendor()) {
802 glslCaps->fRequiresLocalOutputColorForFBFetch = true;
803 }
797 } 804 }
798 805
799 bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrG LInterface* gli) { 806 bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrG LInterface* gli) {
800 bool hasChromiumPathRendering = ctxInfo.hasExtension("GL_CHROMIUM_path_rende ring"); 807 bool hasChromiumPathRendering = ctxInfo.hasExtension("GL_CHROMIUM_path_rende ring");
801 808
802 if (!(ctxInfo.hasExtension("GL_NV_path_rendering") || hasChromiumPathRenderi ng)) { 809 if (!(ctxInfo.hasExtension("GL_NV_path_rendering") || hasChromiumPathRenderi ng)) {
803 return false; 810 return false;
804 } 811 }
805 812
806 if (kGL_GrGLStandard == ctxInfo.standard()) { 813 if (kGL_GrGLStandard == ctxInfo.standard()) {
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { 1947 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
1941 if (options.fEnableInstancedRendering) { 1948 if (options.fEnableInstancedRendering) {
1942 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is); 1949 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is);
1943 #ifndef SK_BUILD_FOR_MAC 1950 #ifndef SK_BUILD_FOR_MAC
1944 // OS X doesn't seem to write correctly to floating point textures when using 1951 // OS X doesn't seem to write correctly to floating point textures when using
1945 // glDraw*Indirect, regardless of the underlying GPU. 1952 // glDraw*Indirect, regardless of the underlying GPU.
1946 fAvoidInstancedDrawsToFPTargets = true; 1953 fAvoidInstancedDrawsToFPTargets = true;
1947 #endif 1954 #endif
1948 } 1955 }
1949 } 1956 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/glsl/GrGLSLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698