aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-10-18 10:21:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-18 14:49:33 +0000
commitc5eceb00adaa05e50ed732985a2df7db17c80053 (patch)
tree9455ade6841ad11d4100971aa6afbb88f1c64521 /src/gpu
parentd7d1997643db3b9b5caaaac235c0e2cd0fa23ec2 (diff)
Add support for ANGLE MSAA framebuffer extensions.
BUG=skia:5804 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3505 Change-Id: I185ae0fdf5657271dc00b8dd88b78a69c3d6e4f1 Reviewed-on: https://skia-review.googlesource.com/3505 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.cpp15
-rw-r--r--src/gpu/gl/GrGLCaps.cpp6
-rw-r--r--src/gpu/gl/GrGLInterface.cpp9
3 files changed, 24 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index b435655a5f..9dccd4bc22 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -748,12 +748,19 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
GET_PROC(FramebufferRenderbuffer);
GET_PROC(FramebufferTexture2D);
- if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) {
- GET_PROC_SUFFIX(RenderbufferStorageMultisample, CHROMIUM);
- GET_PROC_SUFFIX(BlitFramebuffer, CHROMIUM);
- } else if (version >= GR_GL_VER(3,0)) {
+ if (version >= GR_GL_VER(3,0)) {
GET_PROC(RenderbufferStorageMultisample);
GET_PROC(BlitFramebuffer);
+ } else if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) {
+ GET_PROC_SUFFIX(RenderbufferStorageMultisample, CHROMIUM);
+ GET_PROC_SUFFIX(BlitFramebuffer, CHROMIUM);
+ } else {
+ if (extensions.has("GL_ANGLE_framebuffer_multisample")) {
+ GET_PROC_SUFFIX(RenderbufferStorageMultisample, ANGLE);
+ }
+ if (extensions.has("GL_ANGLE_framebuffer_blit")) {
+ GET_PROC_SUFFIX(BlitFramebuffer, ANGLE);
+ }
}
if (extensions.has("GL_CHROMIUM_map_sub")) {
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 23b069f9f8..7a7a722427 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -929,7 +929,8 @@ void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa
} else if (fUsesMixedSamples) {
fMSFBOType = kMixedSamples_MSFBOType;
} else if (ctxInfo.version() >= GR_GL_VER(3,0) ||
- ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
+ ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample") ||
+ ctxInfo.hasExtension("GL_ANGLE_framebuffer_multisample")) {
fMSFBOType = kStandard_MSFBOType;
} else if (ctxInfo.hasExtension("GL_APPLE_framebuffer_multisample")) {
fMSFBOType = kES_Apple_MSFBOType;
@@ -940,7 +941,8 @@ void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa
if (ctxInfo.version() >= GR_GL_VER(3, 0)) {
fBlitFramebufferFlags = kNoFormatConversionForMSAASrc_BlitFramebufferFlag |
kRectsMustMatchForMSAASrc_BlitFramebufferFlag;
- } else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
+ } else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample") ||
+ ctxInfo.hasExtension("GL_ANGLE_framebuffer_blit")) {
// The CHROMIUM extension uses the ANGLE version of glBlitFramebuffer and includes its
// limitations.
fBlitFramebufferFlags = kNoScalingOrMirroring_BlitFramebufferFlag |
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 0a157dda11..72c2b46d41 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -348,6 +348,15 @@ bool GrGLInterface::validate() const {
nullptr == fFunctions.fBlitFramebuffer) {
RETURN_FALSE_INTERFACE
}
+ } else {
+ if (fExtensions.has("GL_ANGLE_framebuffer_multisample") &&
+ nullptr == fFunctions.fRenderbufferStorageMultisample) {
+ RETURN_FALSE_INTERFACE
+ }
+ if (fExtensions.has("GL_ANGLE_framebuffer_blit") &&
+ nullptr == fFunctions.fBlitFramebuffer) {
+ RETURN_FALSE_INTERFACE
+ }
}
if (fExtensions.has("GL_APPLE_framebuffer_multisample")) {
if (nullptr == fFunctions.fRenderbufferStorageMultisampleES2APPLE ||