Index: src/gpu/gl/GrGLProgramDesc.cpp |
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp |
index e3d292c062aedefdee962693097377a865e3598f..e032d514f3b37b32fa22059e4cb3dc64e77bca53 100644 |
--- a/src/gpu/gl/GrGLProgramDesc.cpp |
+++ b/src/gpu/gl/GrGLProgramDesc.cpp |
@@ -141,6 +141,12 @@ bool GrGLProgramDescBuilder::Build(GrProgramDesc* desc, |
// make sure any padding in the header is zeroed. |
memset(header, 0, kHeaderSize); |
+ header->fSwapDstRedAndAlpha = false; |
+ if (GrPixelConfigIsAlphaOnly(pipeline.getRenderTarget()->config()) && |
+ gpu->glCaps().textureRedSupport()) { |
+ header->fSwapDstRedAndAlpha = true; |
+ } |
+ |
if (pipeline.readsFragPosition()) { |
header->fFragPosKey = |
GrGLSLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.getRenderTarget()); |