From a4120a7cb806116363786fb71c18aeec01ba0258 Mon Sep 17 00:00:00 2001 From: Paul Connelly <22944042+pmconne@users.noreply.github.com> Date: Mon, 30 May 2022 11:45:01 -0400 Subject: [PATCH 1/4] Workaround transparency bug on Mali-G72 GPU. --- .../pmc-mali-g72-workaround_2022-05-30-15-45.json | 10 ++++++++++ core/webgl-compatibility/src/Capabilities.ts | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json diff --git a/common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json b/common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json new file mode 100644 index 000000000000..73a3ec48cb78 --- /dev/null +++ b/common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/webgl-compatibility", + "comment": "Apply a workaround for a transparency bug on mobile devices using Mali-G72 graphics chips.", + "type": "none" + } + ], + "packageName": "@itwin/webgl-compatibility" +} \ No newline at end of file diff --git a/core/webgl-compatibility/src/Capabilities.ts b/core/webgl-compatibility/src/Capabilities.ts index 33691cb386b0..e8ce6c3fcaa2 100644 --- a/core/webgl-compatibility/src/Capabilities.ts +++ b/core/webgl-compatibility/src/Capabilities.ts @@ -314,7 +314,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; From 913054aecaaa91705fd4af169273fd6789de8428 Mon Sep 17 00:00:00 2001 From: Paul Connelly <22944042+pmconne@users.noreply.github.com> Date: Tue, 31 May 2022 05:34:15 -0400 Subject: [PATCH 2/4] work around MSAA hang. --- core/webgl-compatibility/src/Capabilities.ts | 2 ++ core/webgl-compatibility/src/test/Compatibility.test.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/core/webgl-compatibility/src/Capabilities.ts b/core/webgl-compatibility/src/Capabilities.ts index e8ce6c3fcaa2..6f67bbb0c7ce 100644 --- a/core/webgl-compatibility/src/Capabilities.ts +++ b/core/webgl-compatibility/src/Capabilities.ts @@ -76,6 +76,7 @@ const buggyIntelMatchers = [ // Regexes to match Mali GPUs known to suffer from GraphicsDriverBugs.msaaWillHang. const buggyMaliMatchers = [ /Mali-G71/, + /Mali-G72/, /Mali-G76/, ]; @@ -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; diff --git a/core/webgl-compatibility/src/test/Compatibility.test.ts b/core/webgl-compatibility/src/test/Compatibility.test.ts index a89b83fba373..514991f46fc6 100644 --- a/core/webgl-compatibility/src/test/Compatibility.test.ts +++ b/core/webgl-compatibility/src/test/Compatibility.test.ts @@ -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 ], From e8ddea033e2285b74082d835e387e9a3359d5be8 Mon Sep 17 00:00:00 2001 From: Paul Connelly <22944042+pmconne@users.noreply.github.com> Date: Tue, 31 May 2022 05:34:57 -0400 Subject: [PATCH 3/4] Update pmc-mali-g72-workaround_2022-05-30-15-45.json --- .../pmc-mali-g72-workaround_2022-05-30-15-45.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json b/common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json index 73a3ec48cb78..82c8eb7c5f21 100644 --- a/common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json +++ b/common/changes/@itwin/webgl-compatibility/pmc-mali-g72-workaround_2022-05-30-15-45.json @@ -2,9 +2,9 @@ "changes": [ { "packageName": "@itwin/webgl-compatibility", - "comment": "Apply a workaround for a transparency bug on mobile devices using Mali-G72 graphics chips.", + "comment": "Apply a workaround for transparency and MSAA bugs on mobile devices using Mali-G72 graphics chips.", "type": "none" } ], "packageName": "@itwin/webgl-compatibility" -} \ No newline at end of file +} From 356d45e19ebeb32d8f59c54590bb51e200e93586 Mon Sep 17 00:00:00 2001 From: Arun George Date: Tue, 31 May 2022 12:01:02 -0400 Subject: [PATCH 4/4] ignore cve for the time being --- tools/internal/scripts/rush/audit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/internal/scripts/rush/audit.js b/tools/internal/scripts/rush/audit.js index dbd31384baea..787a60ad4189 100644 --- a/tools/internal/scripts/rush/audit.js +++ b/tools/internal/scripts/rush/audit.js @@ -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;