aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/gpu/gl/GrGLFunctions.h2
-rw-r--r--include/gpu/gl/GrGLInterface.h2
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.cpp8
-rw-r--r--src/gpu/gl/GrGLCaps.cpp4
-rw-r--r--src/gpu/gl/GrGLCaps.h3
-rw-r--r--src/gpu/gl/GrGLInterface.cpp6
6 files changed, 25 insertions, 0 deletions
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h
index 3a940583a9..59cf55a95e 100644
--- a/include/gpu/gl/GrGLFunctions.h
+++ b/include/gpu/gl/GrGLFunctions.h
@@ -259,6 +259,8 @@ extern "C" {
// NV_path_rendering v1.3
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLProgramPathFragmentInputGenProc)(GrGLuint program, GrGLint location, GrGLenum genMode, GrGLint components,const GrGLfloat *coeffs);
typedef GrGLenum (GR_GL_FUNCTION_TYPE* GrGLPathMemoryGlyphIndexArrayProc)(GrGLuint firstPathName, GrGLenum fontTarget, GrGLsizeiptr fontSize, const GrGLvoid *fontData, GrGLsizei faceIndex, GrGLuint firstGlyphIndex, GrGLsizei numGlyphs, GrGLuint pathParameterTemplate, GrGLfloat emScale);
+ // GL_NV_framebuffer_mixed_samples
+ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCoverageModulationProc)(GrGLenum components);
} // extern "C"
#endif
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
index 231702d5c5..368d19ca51 100644
--- a/include/gpu/gl/GrGLInterface.h
+++ b/include/gpu/gl/GrGLInterface.h
@@ -348,6 +348,8 @@ public:
// NV_path_rendering v1.3
GLPtr<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen;
GLPtr<GrGLPathMemoryGlyphIndexArrayProc> fPathMemoryGlyphIndexArray;
+ // NV_framebuffer_mixed_samples
+ GLPtr<GrGLCoverageModulationProc> fCoverageModulation;
} fFunctions;
// Per-GL func callback
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index c91da9e6c7..6a4fbe20e0 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -278,6 +278,10 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
GET_PROC_SUFFIX(PathMemoryGlyphIndexArray, NV);
}
+ if (extensions.has("GL_NV_framebuffer_mixed_samples")) {
+ GET_PROC_SUFFIX(CoverageModulation, NV);
+ }
+
if (extensions.has("GL_EXT_debug_marker")) {
GET_PROC_SUFFIX(InsertEventMarker, EXT);
GET_PROC_SUFFIX(PushGroupMarker, EXT);
@@ -519,6 +523,10 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
GET_PROC_SUFFIX(PathMemoryGlyphIndexArray, NV);
}
+ if (extensions.has("GL_NV_framebuffer_mixed_samples")) {
+ GET_PROC_SUFFIX(CoverageModulation, NV);
+ }
+
interface->fStandard = kGLES_GrGLStandard;
interface->fExtensions.swap(&extensions);
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index c9009b9053..fe52a540c6 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -54,6 +54,7 @@ void GrGLCaps::reset() {
fFBFetchNeedsCustomOutput = false;
fFBFetchColorName = NULL;
fFBFetchExtensionString = NULL;
+ fFBMixedSamplesSupport = false;
fReadPixelsSupportedCache.reset();
}
@@ -99,6 +100,7 @@ GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) {
fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput;
fFBFetchColorName = caps.fFBFetchColorName;
fFBFetchExtensionString = caps.fFBFetchExtensionString;
+ fFBMixedSamplesSupport = caps.fFBMixedSamplesSupport;
return *this;
}
@@ -371,6 +373,8 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fNvprSupport = kNone_NvprSupport;
}
+ fFBMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_samples");
+
fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker");
// For now these two are equivalent but we could have dst read in shader via some other method
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index d81e34b35e..53587e1ad6 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -178,6 +178,8 @@ public:
const char* fbFetchExtensionString() const { return fFBFetchExtensionString; }
+ bool fbMixedSamplesSupport() const { return fFBMixedSamplesSupport; }
+
InvalidateFBType invalidateFBType() const { return fInvalidateFBType; }
/// What type of buffer mapping is supported?
@@ -389,6 +391,7 @@ private:
bool fDropsTileOnZeroDivide : 1;
bool fFBFetchSupport : 1;
bool fFBFetchNeedsCustomOutput : 1;
+ bool fFBMixedSamplesSupport : 1;
const char* fFBFetchColorName;
const char* fFBFetchExtensionString;
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index dba005976f..2e3dd1f039 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -505,5 +505,11 @@ bool GrGLInterface::validate() const {
}
}
+ if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) {
+ if (NULL == fFunctions.fCoverageModulation) {
+ RETURN_FALSE_INTERFACE
+ }
+ }
+
return true;
}