Opened 7 years ago
Closed 7 years ago
#4670 closed enhancement (fixed)
[PATCH] update mesa software renderers detection
Reported by: | fabio | Owned by: | elexis |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 22 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
hwdetect.js has a way to detect mesa software renderers. As of this mesa commit the "Gallium 0.4 on" prefix was removed.
This patch add support for mesa after that commit:
- if (GL_RENDERER.match(/^(Software Rasterizer|Gallium \S* on (llvm|soft)pipe.*|Mesa X11|Apple Software Renderer|GDI Generic)$/)) + if (GL_RENDERER.match(/^(Software Rasterizer|.*(llvm|soft)pipe.*|Mesa X11|Apple Software Renderer|GDI Generic)$/))
Feel free to push it for a22 (it should do no harm), I cannot do a proper patch right now, or delay to a later release (not so urgent as this only impacts the few users using a slow mesa software renderer).
Attachments (1)
Change History (5)
comment:1 by , 7 years ago
by , 7 years ago
Attachment: | hwdetect.patch added |
---|
comment:2 by , 7 years ago
The code was added in r9305 to disable shadows for that hardware (#623),
extended in r11660 and
consolidated in r17339.
Reading #623, this just seems to be a database which maps arbitrary strings to setting restrictions. So the code has to be maintained and updated frequently, which means we don't really have to check for (database) completion.
Also echotangoecho gave a thumbs up.
fabio how did you find out about this string change?
Do you (still) use that hardware and tested the patch with actual 0ad?
comment:3 by , 7 years ago
I had a look at mesa commits and noticed that change. It is not a real hardware, it's a software renderer and can be tested on Linux setting this variable LIBGL_ALWAYS_SOFTWARE=1
I didn't test it, I cannot right now, but the change really looks straightforward.
About the database in hwdetect, they are mostly for old hardware/drivers, everything is enabled when using recent hardware supporting OpenGL 4+. A cleanup would be nice though, iirc there is a patch on phabricator.
Pros: In the referenced commit, we see
Gallium %s on %s
being removed and now only the second%s
variable being returned.In the proposed patch, we exactly see
Gallium \S* on
removed, so it exactly matches that commit. The patch is complete becauseGallium
doesn't occur anywhere else inbinaries/data/mods/mod
.The patch doesn't have any side-effects (false positive detection),
However: I don't know which strings are actually intended to match. Maybe the list needs extension.
We can usehttps://regex101.com/ and match it against the some example strings.
The one in the commit fails in both cases:
and we see the string would have to be
Gallium foo on llvmpipe
or something like that, which however does exist according to some user reports in the www.So committing the patch would improve and probably not add false positives.