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

Add workarounds for Mali-G72 GPU. #3701

Merged
merged 4 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/webgl-compatibility",
"comment": "Apply a workaround for transparency and MSAA bugs on mobile devices using Mali-G72 graphics chips.",
"type": "none"
}
],
"packageName": "@itwin/webgl-compatibility"
}
5 changes: 4 additions & 1 deletion core/webgl-compatibility/src/Capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const buggyIntelMatchers = [
// Regexes to match Mali GPUs known to suffer from GraphicsDriverBugs.msaaWillHang.
const buggyMaliMatchers = [
/Mali-G71/,
/Mali-G72/,
markschlosseratbentley marked this conversation as resolved.
Show resolved Hide resolved
/Mali-G76/,
];

Expand Down Expand Up @@ -267,6 +268,7 @@ export class Capabilities {
this._driverBugs = {};
if (unmaskedRenderer && buggyIntelMatchers.some((x) => x.test(unmaskedRenderer)))
this._driverBugs.fragDepthDoesNotDisableEarlyZ = true;

if (unmaskedRenderer && buggyMaliMatchers.some((x) => x.test(unmaskedRenderer)))
this._driverBugs.msaaWillHang = true;

Expand Down Expand Up @@ -314,7 +316,8 @@ export class Capabilities {
&& !ProcessDetector.isIOSBrowser
// Samsung Galaxy Note 8 exhibits same issue as described above for iOS >= 15.
// It uses specifically Mali-G71 MP20 but reports its renderer as follows.
&& unmaskedRenderer !== "Mali-G71";
// Samsung Galaxy A50 and S9 exhibits same issue; they use Mali-G72.
&& unmaskedRenderer !== "Mali-G71" && unmaskedRenderer !== "Mali-G72";

if (allowFloatRender && undefined !== this.queryExtensionObject("EXT_float_blend") && this.isTextureRenderable(gl, gl.FLOAT)) {
this._maxRenderType = RenderType.TextureFloat;
Expand Down
1 change: 1 addition & 0 deletions core/webgl-compatibility/src/test/Compatibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ describe("Render Compatibility", () => {
it("detects MSAA hang bug", () => {
const renderers = [
[ "Mali-G71", true ],
[ "Mali-G72", true ],
[ "Mali-G76", true ],
[ "ANGLE (Intel HD Graphics 620 Direct3D11 vs_5_0 ps_5_0)", false ],
[ "Mali-G79", false ],
Expand Down
1 change: 1 addition & 0 deletions tools/internal/scripts/rush/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const rushCommonDir = path.join(__dirname, "../../../../common/");
// All security issues should be addressed asap.
const excludedAdvisories = [
"GHSA-ww39-953v-wcq6", // https://github.com/advisories/GHSA-ww39-953v-wcq6 webpack@4>watchpack>watchpack-chokidar2>chokidar>glob-parent
"GHSA-rp65-9cf3-cjxr", // https://github.com/advisories/GHSA-rp65-9cf3-cjxr @bentley/react-scripts>@svgr/webpack>@svgr/plugin-svgo>svgo>css-select>nth-check
];

let shouldFailBuild = false;
Expand Down