| Index: src/gpu/gl/GrGLCaps.cpp
|
| diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
|
| index a484b05b955301eda63cb89d68e537620b7a6ce4..653b5ca725c9b6d4282d7a93ea3e963ce384fc6b 100644
|
| --- a/src/gpu/gl/GrGLCaps.cpp
|
| +++ b/src/gpu/gl/GrGLCaps.cpp
|
| @@ -12,6 +12,7 @@
|
| #include "GrGLContext.h"
|
| #include "GrGLRenderTarget.h"
|
| #include "glsl/GrGLSLCaps.h"
|
| +#include "instanced/GLInstancedRendering.h"
|
| #include "SkTSearch.h"
|
| #include "SkTSort.h"
|
|
|
| @@ -40,7 +41,6 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
|
| fDrawIndirectSupport = false;
|
| fMultiDrawIndirectSupport = false;
|
| fBaseInstanceSupport = false;
|
| - fCanDrawIndirectToFloat = false;
|
| fIsCoreProfile = false;
|
| fBindFragDataLocationSupport = false;
|
| fRectangleTextureSupport = false;
|
| @@ -526,14 +526,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
|
| fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance");
|
| }
|
|
|
| - // OS X doesn't seem to write correctly to floating point textures when using glDraw*Indirect,
|
| - // regardless of the underlying GPU.
|
| -#ifndef SK_BUILD_FOR_MAC
|
| - if (fDrawIndirectSupport) {
|
| - fCanDrawIndirectToFloat = true;
|
| - }
|
| -#endif
|
| -
|
| this->initShaderPrecisionTable(ctxInfo, gli, glslCaps);
|
|
|
| if (contextOptions.fUseShaderSwizzling) {
|
| @@ -1116,7 +1108,6 @@ SkString GrGLCaps::dump() const {
|
| r.appendf("Draw indirect support: %s\n", (fDrawIndirectSupport ? "YES" : "NO"));
|
| r.appendf("Multi draw indirect support: %s\n", (fMultiDrawIndirectSupport ? "YES" : "NO"));
|
| r.appendf("Base instance support: %s\n", (fBaseInstanceSupport ? "YES" : "NO"));
|
| - r.appendf("Can draw indirect to float: %s\n", (fCanDrawIndirectToFloat ? "YES" : "NO"));
|
| r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO"));
|
| r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO"));
|
| r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSupport ? "YES" : "NO"));
|
| @@ -1935,4 +1926,13 @@ void GrGLCaps::initConfigTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa
|
| #endif
|
| }
|
|
|
| -void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
|
| +void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
|
| + if (options.fEnableInstancedRendering) {
|
| + fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*this);
|
| +#ifndef SK_BUILD_FOR_MAC
|
| + // OS X doesn't seem to write correctly to floating point textures when using
|
| + // glDraw*Indirect, regardless of the underlying GPU.
|
| + fAvoidInstancedDrawsToFPTargets = true;
|
| +#endif
|
| + }
|
| +}
|
|
|