Closed sircodalotkob closed 7 months ago
Should be fixed in the latest master build
Thanks for your fast reply.
The proposed fix scans the GL_RENDERER
string for NVE4
which would certainly solve the issue for me.
However, NVE4
is the codename of the driver that nouveau picks for my Nvidia GeForce GTX 780M graphics card. Nouveau provides several drivers for several chipsets, and GL_RENDERER
would yield different values for different GPUs.
Unfortunately, I cannot suggest a good solution to reliably detect nouveau as the string nouveau
doesn't seem to be present in any GL variable anymore.
Yes, I just realized that. I guess I'll have to come up with a better way to do this.
How about reading the virtual file /proc/modules
and checking for nouveau
in it? Users of other GPU drivers would have the nouveau module blacklisted.
Test fixed. Now using GL_VENDOR: Mesa
and GL_RENDERER: NV*
Looks good to me, thanks!
Platform / OS: Linux 6.6, nouveau driver Hardware: Nvidia GTX 780M
Description of the Issue
flycast has a workaround for nouveau in gl4PixelPipelineShader to prevent the driver's over-aggressive optimization.
That workaround is applied when the constant
NOUVEAU
is set totrue
in the shader which in turn happens whengl.mesa_nouveau
istrue
.gl.mesa_nouveau
is currently initialized like this:gl.mesa_nouveau = strstr((const char *)glGetString(GL_VERSION), "Mesa") != nullptr && !strcmp((const char *)glGetString(GL_VENDOR), "nouveau");
On my system, however, nouveau yields the following values:
With
GL_VENDOR
not equal tonouveau
, the detection fails and the workaround does not get applied. Unfortunately, the workaround is still needed for nouveau or else it discards quite some fragments.