On 6 May 2014 10:44, Ken Thomases <ken(a)codeweavers.com> wrote:
>
I'm inclined to say we don't really need this, but I'll leave that up
to Alexandre.
> + /* Second pass at disabling extensions. This (re)disables extensions that may
> + be implied by the GL version or other extensions. */
Is this really a problem in practice?
> + if (wined3d_settings.disabled_extensions)
> + {
> + parse_extension_string(gl_info, wined3d_settings.disabled_extensions, gl_extension_map,
> + sizeof(gl_extension_map) / sizeof(*gl_extension_map), FALSE);
> + if (WGL_Extensions)
> + parse_extension_string(gl_info, wined3d_settings.disabled_extensions, wgl_extension_map,
> + sizeof(wgl_extension_map) / sizeof(*wgl_extension_map), FALSE);
> + }
It may be nicer to just make parse_extension_string() handle a NULL
"extensions" pointer, and skip all the conditionals here.
> - gl_vendor = wined3d_guess_gl_vendor(gl_info, gl_vendor_str, gl_renderer_str);
> - card_vendor = wined3d_guess_card_vendor(gl_vendor_str, gl_renderer_str);
> - TRACE("Found GL_VENDOR (%s)->(0x%04x/0x%04x).\n", debugstr_a(gl_vendor_str), gl_vendor, card_vendor);
> -
> device = wined3d_guess_card(gl_info, gl_renderer_str, &gl_vendor, &card_vendor);
> TRACE("Found (fake) card: 0x%x (vendor id), 0x%x (device id).\n", card_vendor, device);
I guess this was broken up because of the extension checks in
wined3d_guess_gl_vendor(). Is that really justified? Conceptually, if
we really want the DisabledExtensions functionality in wined3d, I
think it should behave like filtering the extension strings, as
opposed to being some kind of generic way to disable specific wined3d
code paths, but not others that depend on the same extensions.