Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable timer queries on Mali drivers known to be good #7521

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions filament/backend/src/opengl/OpenGLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,18 @@ void OpenGLContext::initBugs(Bugs* bugs, Extensions const& exts,
// - appeared at least in: "OpenGL ES 3.2 v1.r26p0-01eac0"
// - wasn't present in: "OpenGL ES 3.2 v1.r32p1-00pxl1"
// - timer queries sometime crash with an NPE (see b/273759031)
// (see b/273759031)
// - possibly not present in: "OpenGL ES 3.2 v1.r46p0"
bugs->dont_use_timer_query = true;
int maj, min, driverVersion, driverRelease;
int const c = sscanf(version, "OpenGL ES %d.%d v%d.r%d",
&maj, &min, &driverVersion, &driverRelease);
if (UTILS_LIKELY(c == 4)) {
// we were able to parse the version string
if (driverVersion > 1 || (driverVersion == 1 && driverRelease >= 46)) {
bugs->dont_use_timer_query = false;
}
}
}
// Mali seems to have no problem with this (which is good for us)
bugs->allow_read_only_ancillary_feedback_loop = true;
Expand Down