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

Unified Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp

Issue 659443007: Support GLSL es 3.00 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nvpr fix Created 6 years, 2 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/GrGLShaderVar.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/builders/GrGLFragmentShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index 488d07b8dbd21f0de7c8d2db4e9bd7ff722668af..5d5741ef9bc8f4cb04379b6e1dc60b73d34698de 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -42,8 +42,7 @@ static void append_default_precision_qualifier(GrGLShaderVar::Precision p,
}
GrGLFragmentShaderBuilder::DstReadKey
-GrGLFragmentShaderBuilder::KeyForDstRead(const GrTexture* dstCopy,
- const GrGLCaps& caps) {
+GrGLFragmentShaderBuilder::KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps& caps) {
uint32_t key = kYesDstRead_DstReadKeyBit;
if (caps.fbFetchSupport()) {
return key;
@@ -61,8 +60,7 @@ GrGLFragmentShaderBuilder::KeyForDstRead(const GrTexture* dstCopy,
}
GrGLFragmentShaderBuilder::FragPosKey
-GrGLFragmentShaderBuilder::KeyForFragmentPosition(const GrRenderTarget* dst,
- const GrGLCaps&) {
+GrGLFragmentShaderBuilder::KeyForFragmentPosition(const GrRenderTarget* dst, const GrGLCaps&) {
if (kTopLeft_GrSurfaceOrigin == dst->origin()) {
return kTopLeftFragPosRead_FragPosKey;
} else {
@@ -88,7 +86,8 @@ bool GrGLFragmentShaderBuilder::enableFeature(GLSLFeature feature) {
if (!gpu->glCaps().shaderDerivativeSupport()) {
return false;
}
- if (kGLES_GrGLStandard == gpu->glStandard()) {
+ if (kGLES_GrGLStandard == gpu->glStandard() &&
+ k110_GrGLSLGeneration == gpu->glslGeneration()) {
this->addFeature(1 << kStandardDerivatives_GLSLFeature,
"GL_OES_standard_derivatives");
}
@@ -326,7 +325,9 @@ bool GrGLFragmentShaderBuilder::compileAndAttachShaders(GrGLuint programId,
}
void GrGLFragmentShaderBuilder::bindFragmentShaderLocations(GrGLuint programID) {
- if (fHasCustomColorOutput) {
+ // ES 3.00 requires custom color output but doesn't support bindFragDataLocation
+ if (fHasCustomColorOutput &&
+ kGLES_GrGLStandard != fProgramBuilder->gpu()->ctxInfo().standard()) {
GL_CALL(BindFragDataLocation(programID, 0, declared_color_output_name()));
}
if (fHasSecondaryOutput) {
« no previous file with comments | « src/gpu/gl/GrGLShaderVar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698