aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/builders
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-10-16 12:25:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-16 12:25:11 -0700
commit62372bcc6abe3537dac98dd9b9172cf3b85afa2b (patch)
treebe8fb2232585e0770a0fa0a8642798a1de53d477 /src/gpu/gl/builders
parent65151754b9fdb6a968d7307764c20655d1b680a0 (diff)
Support GLSL es 3.00
Diffstat (limited to 'src/gpu/gl/builders')
-rw-r--r--src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index 488d07b8db..5d5741ef9b 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) {