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

Unified Diff: src/gpu/gl/GrGLShaderBuilder.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
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderBuilder.cpp
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index 8d1e66be7c0e69ec7c3de2b1d05bc582f9f74519..171a338ad6ec856c21f4831c8ea4bb3505208026 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -291,20 +291,6 @@ bool GrGLShaderBuilder::enablePrivateFeature(GLSLPrivateFeature feature) {
"GL_ARB_fragment_coord_conventions");
}
return true;
- case kEXTShaderFramebufferFetch_GLSLPrivateFeature:
- if (GrGLCaps::kEXT_FBFetchType != fGpu->glCaps().fbFetchType()) {
- return false;
- }
- this->addFSFeature(1 << kEXTShaderFramebufferFetch_GLSLPrivateFeature,
- "GL_EXT_shader_framebuffer_fetch");
- return true;
- case kNVShaderFramebufferFetch_GLSLPrivateFeature:
- if (GrGLCaps::kNV_FBFetchType != fGpu->glCaps().fbFetchType()) {
- return false;
- }
- this->addFSFeature(1 << kNVShaderFramebufferFetch_GLSLPrivateFeature,
- "GL_NV_shader_framebuffer_fetch");
- return true;
default:
SkFAIL("Unexpected GLSLPrivateFeature requested.");
return false;
@@ -342,14 +328,11 @@ const char* GrGLShaderBuilder::dstColor() {
return "";
}
}
- static const char kFBFetchColorName[] = "gl_LastFragData[0]";
- GrGLCaps::FBFetchType fetchType = fGpu->glCaps().fbFetchType();
- if (GrGLCaps::kEXT_FBFetchType == fetchType) {
- SkAssertResult(this->enablePrivateFeature(kEXTShaderFramebufferFetch_GLSLPrivateFeature));
- return kFBFetchColorName;
- } else if (GrGLCaps::kNV_FBFetchType == fetchType) {
- SkAssertResult(this->enablePrivateFeature(kNVShaderFramebufferFetch_GLSLPrivateFeature));
- return kFBFetchColorName;
+
+ if (GrGLCaps::kNone_FBFetchType != fGpu->glCaps().fbFetchType()) {
+ this->addFSFeature(1 << fGpu->glCaps().fbFetchType(),
krajcevski 2014/07/30 21:50:19 Doesn't this clash with kFragCoordConventions_GLSL
+ fGpu->glCaps().fbFetchExtensionString());
+ return fGpu->glCaps().fbFetchColorName();
} else if (fOutput.fUniformHandles.fDstCopySamplerUni.isValid()) {
return kDstCopyColorName;
} else {
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698