}
}
+ fBindUniformLocationSupport = ctxInfo.hasExtension("GL_CHROMIUM_bind_uniform_location");
+
#ifdef SK_BUILD_FOR_WIN
// We're assuming that on Windows Chromium we're using ANGLE.
bool isANGLE = kANGLE_GrGLDriver == ctxInfo.driver() ||
r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "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"));
return r;
}
bool bindFragDataLocationSupport() const { return fBindFragDataLocationSupport; }
+ bool bindUniformLocationSupport() const { return fBindUniformLocationSupport; }
+
/**
* Is there support for enabling/disabling sRGB writes for sRGB-capable color attachments?
* If false this does not mean sRGB is not supported but rather that if it is supported
bool fSRGBWriteControl : 1;
bool fRGBA8888PixelsOpsAreSlow : 1;
bool fPartialFBOReadIsSlow : 1;
+ bool fBindUniformLocationSupport : 1;
struct ReadPixelsSupportedFormat {
GrGLenum fFormat;
}
void GrGLProgramBuilder::bindProgramResourceLocations(GrGLuint programID) {
- bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation != nullptr;
- if (usingBindUniform) {
+ if (fGpu->glCaps().bindUniformLocationSupport()) {
int count = fUniforms.count();
for (int i = 0; i < count; ++i) {
GL_CALL(BindUniformLocation(programID, i, fUniforms[i].fVariable.c_str()));