Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp |
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
index 97fcce59b777313d690bc1d7d700529b67305e9f..413874a43cf4b1b6eb88a03f4e258ce85eb2b3bb 100644 |
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
@@ -260,6 +260,19 @@ void GrGLProgramBuilder::emitAndInstallXferProc(const GrXferProcessor& xp, |
// asks for dst color, then the emit code needs to follow suit |
verify(xp); |
fFS.codeAppend("}"); |
+ |
+ GrSwizzle swizzle; |
+ swizzle.setFromKey(this->desc().header().fOutputSwizzle); |
+ if (swizzle != GrSwizzle::RGBA()) { |
+ fFS.codeAppendf("%s = %s.%s;", fFS.getPrimaryColorOutputName(), |
+ fFS.getPrimaryColorOutputName(), |
+ swizzle.c_str()); |
+ if (xp.hasSecondaryOutput()) { |
+ fFS.codeAppendf("%s = %s.%s;", fFS.getSecondaryColorOutputName(), |
+ fFS.getSecondaryColorOutputName(), |
+ swizzle.c_str()); |
+ } |
+ } |
} |
void GrGLProgramBuilder::verify(const GrPrimitiveProcessor& gp) { |