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

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

Issue 1666563003: Add support for GL_EXT_raster_multisample (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 d95e10ba64d80d3c53ad73e48e725db38d299161..599e375c231b3e1f4e2992b163d20d2058ce98d5 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -306,11 +306,19 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fShaderCaps->pathRenderingSupport()) {
fUsesMixedSamples = ctxInfo.hasExtension("GL_NV_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())) {
- fDiscardRenderTargetSupport = false;
- fInvalidateFBType = kNone_InvalidateFBType;
+ if (fUsesMixedSamples) {
+ if (kNVIDIA_GrGLDriver == ctxInfo.driver() ||
+ kChromium_GrGLDriver == ctxInfo.driver()) {
+ // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed samples.
+ fDiscardRenderTargetSupport = false;
+ fInvalidateFBType = kNone_InvalidateFBType;
+ }
+ // Raster multisample is only useful to us when coverage modulation is also supported,
+ // as defined by mixed samples.
+ fRasterMultisampleSupport = ctxInfo.hasExtension("GL_EXT_raster_multisample");
+ if (fRasterMultisampleSupport) {
+ GR_GL_GetIntegerv(gli, GR_GL_MAX_RASTER_SAMPLES, &fMaxRasterSamples);
+ }
}
}
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698