Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Cap check Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 40405fd55c1549660127ce6b6ffc4951177b0a03..33973c5fea410b4132ff7d6eaec2875f525b4250 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -237,7 +237,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fES2CompatibilitySupport = true;
}
- if (kGL_GrGLStandard == standard) {
+ if (kGL_GrGLStandard == standard || fShaderCaps->mixedSamplesSupport()) {
Chris Dalton 2015/06/11 23:34:38 This won't quite work. See below how mixed samples
fMultisampleDisableSupport = true;
} else {
fMultisampleDisableSupport = false;
@@ -789,6 +789,8 @@ void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa
fMSFBOType = kES_EXT_MsToTexture_MSFBOType;
} else if (ctxInfo.hasExtension("GL_IMG_multisampled_render_to_texture")) {
fMSFBOType = kES_IMG_MsToTexture_MSFBOType;
+ } else if (fShaderCaps->mixedSamplesSupport() && fShaderCaps->pathRenderingSupport()) {
+ fMSFBOType = kMixedSamples_MSFBOType;
} else if (ctxInfo.version() >= GR_GL_VER(3,0)) {
fMSFBOType = GrGLCaps::kES_3_0_MSFBOType;
} else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
@@ -799,7 +801,9 @@ void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa
fMSFBOType = kES_Apple_MSFBOType;
}
} else {
- if ((ctxInfo.version() >= GR_GL_VER(3,0)) ||
+ if (fShaderCaps->mixedSamplesSupport() && fShaderCaps->pathRenderingSupport()) {
+ fMSFBOType = kMixedSamples_MSFBOType;
+ } else if ((ctxInfo.version() >= GR_GL_VER(3,0)) ||
ctxInfo.hasExtension("GL_ARB_framebuffer_object")) {
fMSFBOType = GrGLCaps::kDesktop_ARB_MSFBOType;
} else if (ctxInfo.hasExtension("GL_EXT_framebuffer_multisample") &&
@@ -932,6 +936,7 @@ SkString GrGLCaps::dump() const {
"Apple",
"IMG MS To Texture",
"EXT MS To Texture",
+ "MixedSamples",
};
GR_STATIC_ASSERT(0 == kNone_MSFBOType);
GR_STATIC_ASSERT(1 == kDesktop_ARB_MSFBOType);
@@ -940,6 +945,7 @@ SkString GrGLCaps::dump() const {
GR_STATIC_ASSERT(4 == kES_Apple_MSFBOType);
GR_STATIC_ASSERT(5 == kES_IMG_MsToTexture_MSFBOType);
GR_STATIC_ASSERT(6 == kES_EXT_MsToTexture_MSFBOType);
+ GR_STATIC_ASSERT(7 == kMixedSamples_MSFBOType);
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kMSFBOExtStr) == kLast_MSFBOType + 1);
static const char* kInvalidateFBTypeStr[] = {
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698