diff options
author | Robert Phillips <robertphillips@google.com> | 2017-05-24 07:44:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-25 13:40:16 +0000 |
commit | 3b3307f2b10177e4afa7b2a70511f7e547ed25bc (patch) | |
tree | 7582a7a91b288a2a1cf6c9b7b5e35f4c94e8c8a8 | |
parent | c998f733e3a3da0674fe32acfcec34b4650e4c2a (diff) |
Disable MSAA for Intel GPUs and re-enable GrSurfaceRenderability test
This CL replaces: https://skia-review.googlesource.com/c/17710/ (Re-enable GrSurfaceRenderability test)
Change-Id: I5626e4fc3581cd2b17fe0f0ad3a9e9bc35b7aa4c
Reviewed-on: https://skia-review.googlesource.com/17764
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 9 | ||||
-rw-r--r-- | tests/GrSurfaceTest.cpp | 13 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 9fb8db42e5..609533897c 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -985,7 +985,7 @@ void GrGLCaps::initFSAASupport(const GrContextOptions& contextOptions, const GrG this->shaderCaps()->pathRenderingSupport() && (contextOptions.fGpuPathRenderers & GrContextOptions::GpuPathRenderers::kStencilAndCover)) { fUsesMixedSamples = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_samples") || - ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_mixed_samples"); + ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_mixed_samples"); // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed samples. if (fUsesMixedSamples && (kNVIDIA_GrGLDriver == ctxInfo.driver() || kChromium_GrGLDriver == ctxInfo.driver())) { @@ -1043,6 +1043,11 @@ void GrGLCaps::initFSAASupport(const GrContextOptions& contextOptions, const GrG } } + // We disable MSAA across the board for Intel GPUs + if (kIntel_GrGLVendor == ctxInfo.vendor()) { + fMSFBOType = kNone_MSFBOType; + } + if (GrGLCaps::kES_IMG_MsToTexture_MSFBOType == fMSFBOType) { GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES_IMG, &fMaxStencilSampleCount); } else if (GrGLCaps::kNone_MSFBOType != fMSFBOType) { @@ -1654,7 +1659,7 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions, fConfigTable[kSBGRA_8888_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType; if (fSRGBSupport && kGL_GrGLStandard == standard) { fConfigTable[kSBGRA_8888_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag | - allRenderFlags; + allRenderFlags; } if (texStorageSupported) { diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp index dc265fd359..8c596d915b 100644 --- a/tests/GrSurfaceTest.cpp +++ b/tests/GrSurfaceTest.cpp @@ -70,11 +70,11 @@ DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrSurface, reporter, ctxInfo) { context->getGpu()->deleteTestingOnlyBackendTexture(backendTexHandle); } -#if 0 // This test checks that the isConfigTexturable and isConfigRenderable are // consistent with createTexture's result. DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); + GrResourceProvider* resourceProvider = context->resourceProvider(); const GrCaps* caps = context->caps(); GrPixelConfig configs[] = { @@ -88,7 +88,6 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { kSRGBA_8888_GrPixelConfig, kSBGRA_8888_GrPixelConfig, kRGBA_8888_sint_GrPixelConfig, - kETC1_GrPixelConfig, kRGBA_float_GrPixelConfig, kRG_float_GrPixelConfig, kAlpha_half_GrPixelConfig, @@ -107,21 +106,19 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { desc.fSampleCnt = 0; desc.fConfig = config; - sk_sp<GrSurface> tex = context->resourceProvider()->createTexture(desc, SkBudgeted::kNo); - REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigTexturable(desc.fConfig, - desc.fOrigin)); + sk_sp<GrSurface> tex = resourceProvider->createTexture(desc, SkBudgeted::kNo); + REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigTexturable(desc.fConfig)); desc.fFlags = kRenderTarget_GrSurfaceFlag; - tex = context->resourceProvider()->createTexture(desc, SkBudgeted::kNo); + tex = resourceProvider->createTexture(desc, SkBudgeted::kNo); REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigRenderable(config, false)); desc.fSampleCnt = 4; - tex = context->resourceProvider()->createTexture(desc, SkBudgeted::kNo); + tex = resourceProvider->createTexture(desc, SkBudgeted::kNo); REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigRenderable(config, true)); } } } -#endif #include "GrDrawingManager.h" #include "GrSurfaceProxy.h" |