Due to me updating to mesa-git, the gl vendor string got changed and now wine thinks it's an nvidia card, so this patch fixes it
-- v2: wined3d: Fix bug with AMD gl vendor returning nvidia
From: Etaash Mathamsetty etaash.mathamsetty@gmail.com
--- dlls/wined3d/adapter_gl.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 60a168b5cef..8ad638edf0d 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -1216,6 +1216,7 @@ static enum wined3d_pci_vendor wined3d_guess_card_vendor(const char *gl_vendor_s if (strstr(gl_vendor_string, "ATI") || strstr(gl_vendor_string, "Advanced Micro Devices, Inc.") || strstr(gl_vendor_string, "X.Org R300 Project") + || strstr(gl_vendor_string, "AMD") || strstr(gl_renderer, "AMD") || strstr(gl_renderer, "FirePro") || strstr(gl_renderer, "Radeon")
The change is probably fine, but I think the commit message is insufficient. In particular: - What were the GL_VENDOR and GL_RENDERER strings before? - What are the GL_VENDOR and GL_RENDERER strings now? - Why are we even getting here? Is GLX_MESA_query_renderer unavailable?
I also wish Mesa wouldn't do this kind of thing; we can fix future Wine releases, but there's nothing we can do for existing Wine releases.
On Mon Sep 12 10:45:17 2022 +0000, Henri Verbeet wrote:
The change is probably fine, but I think the commit message is insufficient. In particular:
- What were the GL_VENDOR and GL_RENDERER strings before?
- What are the GL_VENDOR and GL_RENDERER strings now?
- Why are we even getting here? Is GLX_MESA_query_renderer unavailable?
I also wish Mesa wouldn't do this kind of thing; we can fix future Wine releases, but there's nothing we can do for existing Wine releases.
1. I am not sure what the strings were before (and I don't really want to downgrade my mesa version to check) 2. GL_VENDOR = AMD, GL_RENDERER = RENOIR (renoir, LLVM 14.0.6, DRM 3.47, 5.19.7-zen2-1-zen) 3. not sure glxinfo says GLX_MESA_query_renderer is available
On 9/12/22 05:45, Etaash Mathamsetty (@etaash.mathamsetty) wrote:
On Mon Sep 12 10:45:17 2022 +0000, Henri Verbeet wrote:
The change is probably fine, but I think the commit message is insufficient. In particular:
- What were the GL_VENDOR and GL_RENDERER strings before?
- What are the GL_VENDOR and GL_RENDERER strings now?
- Why are we even getting here? Is GLX_MESA_query_renderer unavailable?
I also wish Mesa wouldn't do this kind of thing; we can fix future Wine releases, but there's nothing we can do for existing Wine releases.
- I am not sure what the strings were before (and I don't really want to downgrade my mesa version to check)
- GL_VENDOR = AMD, GL_RENDERER = RENOIR (renoir, LLVM 14.0.6, DRM 3.47, 5.19.7-zen2-1-zen)
- not sure glxinfo says GLX_MESA_query_renderer is available
What git tag have you built mesa at?
Can you attach the glxinfo output?
- I am not sure what the strings were before (and I don't really want to downgrade my mesa version to check, if you really want to know, I can run glxinfo on a live distro)
It would be helpful to understand what exactly changed, although perhaps not critical.
- GL_VENDOR = "AMD", GL_RENDERER = "RENOIR (renoir, LLVM 14.0.6, DRM 3.47, 5.19.7-zen2-1-zen)"
- not sure, glxinfo says GLX_MESA_query_renderer is available
We may be missing an entry in `gpu_description_table[]` (in directx.c) for RENOIR. That would imply it previously wasn't getting correctly reported either though, even if it was getting reported as an AMD card instead of an NVIDIA card.
On 9/12/22 07:06, Henri Verbeet (@hverbeet) wrote:
- I am not sure what the strings were before (and I don't really want to downgrade my mesa version to check, if you really want to know, I can run glxinfo on a live distro)
It would be helpful to understand what exactly changed, although perhaps not critical.
As far as I can tell it was changed (perhaps inadvertently) by Mesa commit 0cb42c57c569443b0af8296dfff4da1e6ab241ef. Previously "AMD" string would be present in the renderer string for cases where there was no marketing name (i.e. Etaash's gpu would have a GL_RENDERER value beginning with "AMD RENOIR").
As far as I can tell, radeonsi has only ever reported a GL_VENDOR of "X.org" or (more recently) "AMD", so we've been relying on "AMD" being present in the renderer string.
It may also be a good idea to try matching the card vendor based on the PCI vendor first; I imagine that will remain a bit more stable against changes like this.
- GL_VENDOR = "AMD", GL_RENDERER = "RENOIR (renoir, LLVM 14.0.6, DRM 3.47, 5.19.7-zen2-1-zen)"
- not sure, glxinfo says GLX_MESA_query_renderer is available
We may be missing an entry in `gpu_description_table[]` (in directx.c) for RENOIR. That would imply it previously wasn't getting correctly reported either though, even if it was getting reported as an AMD card instead of an NVIDIA card.
Indeed, we should add this regardless.
On Mon Sep 12 17:58:02 2022 +0000, **** wrote:
Zebediah Figura replied on the mailing list:
On 9/12/22 05:45, Etaash Mathamsetty (@etaash.mathamsetty) wrote: > On Mon Sep 12 10:45:17 2022 +0000, Henri Verbeet wrote: >> The change is probably fine, but I think the commit message is >> insufficient. In particular: >> - What were the GL_VENDOR and GL_RENDERER strings before? >> - What are the GL_VENDOR and GL_RENDERER strings now? >> - Why are we even getting here? Is GLX_MESA_query_renderer unavailable? >> I also wish Mesa wouldn't do this kind of thing; we can fix future Wine >> releases, but there's nothing we can do for existing Wine releases. > 1. I am not sure what the strings were before (and I don't really want to downgrade my mesa version to check) > 2. GL_VENDOR = AMD, GL_RENDERER = RENOIR (renoir, LLVM 14.0.6, DRM 3.47, 5.19.7-zen2-1-zen) > 3. not sure glxinfo says GLX_MESA_query_renderer is available > What git tag have you built mesa at? Can you attach the glxinfo output?
glxinfo: [glxinfo.txt](/uploads/03c3ff7fb05866c5df2556a5bb30a15f/glxinfo.txt)
On Mon Sep 12 21:32:05 2022 +0000, Henri Verbeet wrote:
- I am not sure what the strings were before (and I don't really want
to downgrade my mesa version to check, if you really want to know, I can run glxinfo on a live distro) It would be helpful to understand what exactly changed, although perhaps not critical.
- GL_VENDOR = "AMD", GL_RENDERER = "RENOIR (renoir, LLVM 14.0.6, DRM
3.47, 5.19.7-zen2-1-zen)"
- not sure, glxinfo says GLX_MESA_query_renderer is available
We may be missing an entry in `gpu_description_table[]` (in directx.c) for RENOIR. That would imply it previously wasn't getting correctly reported either though, even if it was getting reported as an AMD card instead of an NVIDIA card.
that would be strange, renoir has been out for 2 years and if I am not mistaken, many people do use ryzen 4000 series APUs?