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

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 433603002: FBFetch refactor + arm support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 8474873ffff5d937f5edc2084e67e0bc5002ac17..a5053774220bf97b7e98e30181f0f32c505c5a53 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -234,8 +234,19 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
if (kGLES_GrGLStandard == standard) {
if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
fFBFetchType = kEXT_FBFetchType;
+ fFBFetchColorName = "gl_LastFragData[0]";
+ fFBFetchExtensionString = "GL_EXT_shader_framebuffer_fetch";
} else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) {
fFBFetchType = kNV_FBFetchType;
+ fFBFetchColorName = "gl_LastFragData[0]";
+ fFBFetchExtensionString = "GL_NV_shader_framebuffer_fetch";
+ } else if (ctxInfo.hasExtension("GL_ARM_shader_framebuffer_fetch")) {
+ // The arm extension requires specifically enabling MSAA fetching per sample.
+ // On some devices this may have a perf hit. Also multiple render targets are disabled
+ GR_GL_CALL(gli, Enable(GR_GL_FETCH_PER_SAMPLE_ARM));
+ fFBFetchType = kARM_FBFetchType;
+ fFBFetchColorName = "gl_LastFragColorARM";
+ fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch";
}
}
@@ -779,10 +790,12 @@ SkString GrGLCaps::dump() const {
"None",
"EXT",
"NV",
+ "ARM",
};
GR_STATIC_ASSERT(0 == kNone_FBFetchType);
GR_STATIC_ASSERT(1 == kEXT_FBFetchType);
GR_STATIC_ASSERT(2 == kNV_FBFetchType);
+ GR_STATIC_ASSERT(3 == kARM_FBFetchType);
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFBFetchTypeStr) == kLast_FBFetchType + 1);
static const char* kInvalidateFBTypeStr[] = {

Powered by Google App Engine
This is Rietveld 408576698