gl.rs: Fix Mali Bifrost GPU detection on Mesa's Panfrost driver#300
Closed
qwertychouskie wants to merge 1 commit into
Closed
gl.rs: Fix Mali Bifrost GPU detection on Mesa's Panfrost driver#300qwertychouskie wants to merge 1 commit into
qwertychouskie wants to merge 1 commit into
Conversation
The `GL_RENDERER` string contains more information when using the Panfrost driver from Mesa. For example, an Arm Mali-G31 GPU currently returns this render string: `Mali-G31 MC1 (Panfrost)` Exact-matching the string would result in not properly considering these GPUs to be Bifrost. Using `starts_with` instead should make these GPUs detect properly when using Panfrost, while not changing detection with the proprietary driver. Signed-off-by: QwertyChouskie <qwertychouskie@users.noreply.github.com>
No Taskcluster jobs started for this pull requestThe |
Contributor
|
(Automated Close) Please do not file pull requests here, see https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
GL_RENDERERstring contains more information when using the Panfrost driver from Mesa. For example, an Arm Mali-G31 GPU currently returns this render string:Mali-G31 MC1 (Panfrost)Exact-matching the string would result in not properly considering these GPUs to be Bifrost. Using
starts_withinstead should make these GPUs detect properly when using Panfrost, while not changing detection with the proprietary driver.Note: This will probably result in
supports_render_target_partial_updatebeing false when using Panfrost on a Bifrost GPU, were it would have returned true before, due to the GPU being mistakenly identified as Valhall. Ifsupports_render_target_partial_updateworks on Panfrost, the check should probably be updated to only return false ifPanfrostisn't present in the render string. Honestly, a lot of the generation-specific feature disabling probably needs to be tested and adjusted to account for Panfrost anyways. (For that matter, this probably applies to other Mesa drivers, such as Freedreno.) That said, it's better safe than sorry, so for now, properly detecting Bifrost GPUs as Bifrost and not Valhall is probably the best first step.Note: I haven't tested this; I actually noticed this issue while doing some research unrelated to Firefox. It should be correct from a technical standpoint, as best as I can tell, and the change is extremely simple, so I feel comfortable submitting this PR.