Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4f356bdc7ec..9e3ed874c9a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1129,7 +1129,7 @@ bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct win
if (!id) { - WARN("Failed to allocate buffer.\n"); + ERR("Failed to allocate buffer.\n"); return false; } }
This is significantly more convenient, and scriptable, than modifying the registry.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/wined3d_main.c | 41 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 5bddc2587f4..67066dcab42 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -206,6 +206,7 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) HKEY appkey = 0; DWORD tmpvalue; WNDCLASSA wc; + char *string;
wined3d_context_tls_idx = TlsAlloc(); if (wined3d_context_tls_idx == TLS_OUT_OF_INDEXES) @@ -373,24 +374,7 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) TRACE("Limiting PS shader model to %u.\n", wined3d_settings.max_sm_ps); if (!get_config_key_dword(hkey, appkey, "MaxShaderModelCS", &wined3d_settings.max_sm_cs)) TRACE("Limiting CS shader model to %u.\n", wined3d_settings.max_sm_cs); - if (!get_config_key(hkey, appkey, "renderer", buffer, size)) - { - if (!strcmp(buffer, "vulkan")) - { - ERR_(winediag)("Using the Vulkan renderer.\n"); - wined3d_settings.renderer = WINED3D_RENDERER_VULKAN; - } - else if (!strcmp(buffer, "gl")) - { - ERR_(winediag)("Using the OpenGL renderer.\n"); - wined3d_settings.renderer = WINED3D_RENDERER_OPENGL; - } - else if (!strcmp(buffer, "gdi") || !strcmp(buffer, "no3d")) - { - ERR_(winediag)("Disabling 3D support.\n"); - wined3d_settings.renderer = WINED3D_RENDERER_NO3D; - } - } + if (!get_config_key_dword(hkey, appkey, "cb_access_map_w", &tmpvalue) && tmpvalue) { TRACE("Forcing all constant buffers to be write-mappable.\n"); @@ -398,6 +382,27 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) } }
+ if (!(string = getenv("WINE_D3D_RENDERER")) && !get_config_key(hkey, appkey, "renderer", buffer, size)) + string = buffer; + if (string) + { + if (!strcmp(string, "vulkan")) + { + ERR_(winediag)("Using the Vulkan renderer.\n"); + wined3d_settings.renderer = WINED3D_RENDERER_VULKAN; + } + else if (!strcmp(string, "gl")) + { + ERR_(winediag)("Using the OpenGL renderer.\n"); + wined3d_settings.renderer = WINED3D_RENDERER_OPENGL; + } + else if (!strcmp(string, "gdi") || !strcmp(string, "no3d")) + { + ERR_(winediag)("Disabling 3D support.\n"); + wined3d_settings.renderer = WINED3D_RENDERER_NO3D; + } + } + if (appkey) RegCloseKey( appkey ); if (hkey) RegCloseKey( hkey );
On Sat, 5 Mar 2022 at 00:39, Zebediah Figura zfigura@codeweavers.com wrote:
This is significantly more convenient, and scriptable, than modifying the registry.
I don't mind this, although I think in recent history we've preferred to stick with the registry for Wine configuration. It does raise the question what's special about the "renderer" setting compared to some of the other configuration options we have, other than that it happens to affect something currently under active development. Something analogous to vkd3d's VKD3D_CONFIG may be nicer in that regard. (Although VKD3D_CONFIG exists for very different reasons.)
In terms of scripting though, I've been using "wine reg add ..." and "wine reg delete ..." for this as well as other configuration like "csmt", "shader_backend" and "MaxVersionGL", and I can't say I've had issue with that.
On 3/7/22 05:06, Henri Verbeet wrote:
On Sat, 5 Mar 2022 at 00:39, Zebediah Figura zfigura@codeweavers.com wrote:
This is significantly more convenient, and scriptable, than modifying the registry.
I don't mind this, although I think in recent history we've preferred to stick with the registry for Wine configuration. It does raise the question what's special about the "renderer" setting compared to some of the other configuration options we have, other than that it happens to affect something currently under active development. Something analogous to vkd3d's VKD3D_CONFIG may be nicer in that regard. (Although VKD3D_CONFIG exists for very different reasons.)
Nothing's particularly special about the "renderer" setting, except perhaps that it's more common to modify nowadays (and less of a "workaround" setting than others). But in any case adding a generic configuration variable seems reasonable to me as well.
In terms of scripting though, I've been using "wine reg add ..." and "wine reg delete ..." for this as well as other configuration like "csmt", "shader_backend" and "MaxVersionGL", and I can't say I've had issue with that.
"wine reg add" is scriptable enough, sure; I shouldn't have mentioned that. It's still a lot less convenient, though (e.g. harder to remember and type, slower due to Wine process overhead...)
For what it's worth, this is a request that came up when some other people were testing the Vulkan backend.
Sorry, please ignore this patch. The next one in the list does not depend on it.