aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-07 09:01:05 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-07 14:30:10 +0000
commit25d07fc354f9150f6d2292be27554db4fc454ad6 (patch)
tree48abeba3dff608e8c73d462e031c124dac905306 /src
parent461ef7af88cc966007c464130a971ec86c803f1d (diff)
Prefer kMixedSamples MSFBOType to multisampled-render-to-texture variants
Bug: skia:7667 Change-Id: Ib5eef15ed1a2da5caf9d8be188b28341ab4d514b Reviewed-on: https://skia-review.googlesource.com/112720 Reviewed-by: Kimmo Kinnunen FI <kkinnunen@nvidia.com> Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 8e5806f851..957811e70f 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -941,14 +941,15 @@ void GrGLCaps::initFSAASupport(const GrContextOptions& contextOptions, const GrG
// it is part of the spec. Thus alpha8 will not be renderable for those devices.
fAlpha8IsRenderable = true;
}
- // We prefer the EXT/IMG extension over ES3 MSAA because we've observed
- // ES3 driver bugs on at least one device with a tiled GPU (N10).
- if (ctxInfo.hasExtension("GL_EXT_multisampled_render_to_texture")) {
+ // We prefer multisampled-render-to-texture extensions over ES3 MSAA because we've observed
+ // ES3 driver bugs on at least one device with a tiled GPU (N10). However, if we're using
+ // mixed samples we can't use multisampled-render-to-texture.
+ if (fUsesMixedSamples) {
+ fMSFBOType = kMixedSamples_MSFBOType;
+ } else if (ctxInfo.hasExtension("GL_EXT_multisampled_render_to_texture")) {
fMSFBOType = kES_EXT_MsToTexture_MSFBOType;
} else if (ctxInfo.hasExtension("GL_IMG_multisampled_render_to_texture")) {
fMSFBOType = kES_IMG_MsToTexture_MSFBOType;
- } else if (fUsesMixedSamples) {
- fMSFBOType = kMixedSamples_MSFBOType;
} else if (ctxInfo.version() >= GR_GL_VER(3,0)) {
fMSFBOType = kStandard_MSFBOType;
} else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {