On Sun, Nov 7, 2010 at 2:08 PM, Brian Paterni bpaterni@gmail.com wrote:
Hello, I've been receiving a couple "unrecognized GL_VENDOR" fixme's lately and decided to poke around wine's source. I've found that wined3d_guess_card_vendor does not return the correct enum for people running mesa's r600g driver, and now that r600g returns "AMD <gpu chip>" as part of openGL's renderer string, we can easily use that to check for AMD (ATI) hardware:
dlls/wined3d/directx.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 32d2431..3908c5f 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1373,11 +1373,10 @@ 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, "X.Org") && strstr(gl_renderer, "AMD"))
|| strstr(gl_renderer, "R100") || strstr(gl_renderer, "R200")
- || strstr(gl_renderer, "R300")
- || strstr(gl_renderer, "R600")
- || strstr(gl_renderer, "R700"))
- || strstr(gl_renderer, "R300"))
return HW_VENDOR_ATI;
if (strstr(gl_vendor_string, "Intel(R)")
1.7.2.3
Howdy Brian,
You're mixing tabs and spaces. Please use consistent spacing, as the rest of the file does.
On Sun, Nov 07, 2010 at 06:48:22PM -0800, Austin English wrote:
Howdy Brian,
You're mixing tabs and spaces. Please use consistent spacing, as the rest of the file does.
Indeed, I was wondering about that... Also, I realized after submitting my previous email that checking for "X.Org" in gl_vendor_string is probably unnecessary as well, so I removed that portion from the following:
--- dlls/wined3d/directx.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 32d2431..fa5b5cb 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1373,11 +1373,10 @@ 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_renderer, "AMD") || strstr(gl_renderer, "R100") || strstr(gl_renderer, "R200") - || strstr(gl_renderer, "R300") - || strstr(gl_renderer, "R600") - || strstr(gl_renderer, "R700")) + || strstr(gl_renderer, "R300")) return HW_VENDOR_ATI;
if (strstr(gl_vendor_string, "Intel(R)")
On 8 November 2010 05:52, Brian Paterni bpaterni@gmail.com wrote:
Indeed, I was wondering about that... Also, I realized after submitting my previous email that checking for "X.Org" in gl_vendor_string is probably unnecessary as well, so I removed that portion from the following:
Couple of points: - Killing the "R600" and "R700" matches is going to kill detection on older versions of the driver. It may make sense to do that as a cleanup at some point, especially considering that r600g is a relatively new driver, but for the moment I think it's still a bit too early. - Patches aren't picked up from wine-devel, just wine-patches. - I think it should be obvious that I wrote a wined3d patch for testing before pushing 9f064116458ff68b92f179a19be4615f003eaa3e.