Module: wine
Branch: master
Commit: 47be32f3d1fc6fbbcd2faae96ae1f8a3d617c0fe
URL: https://gitlab.winehq.org/wine/wine/-/commit/47be32f3d1fc6fbbcd2faae96ae1f8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Mar 13 13:15:53 2024 +0100
wined3d: Do not check the input signature element count for sm4+ shaders in shader_spirv_compile_arguments_init().
Shader model 4 fragment shaders can have more than 12 input varyings. That's
fine though, because we don't need to build a varying map for them in the
first place. Note that in principle the ERR in question could still be
triggered by e.g. attempting to use a shader model 4 fragment shader with a
shader model 3 vertex shader.
---
dlls/wined3d/shader_spirv.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/shader_spirv.c b/dlls/wined3d/shader_spirv.c
index 7b054c7cd9d..4e9b291a0ce 100644
--- a/dlls/wined3d/shader_spirv.c
+++ b/dlls/wined3d/shader_spirv.c
@@ -169,16 +169,15 @@ static void shader_spirv_compile_arguments_init(struct shader_spirv_compile_argu
{
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
- if (ps)
+ if (shader->reg_maps.shader_version.major < 4 && ps)
{
struct shader_spirv_graphics_program_vk *vs_program = shader->backend_data;
struct shader_spirv_graphics_program_vk *ps_program = ps->backend_data;
if (ps_program->signature_info.input.element_count > ARRAY_SIZE(args->u.vs.varying_map))
ERR("Unexpected inter-stage varying count %u.\n", ps_program->signature_info.input.element_count);
- if (shader->reg_maps.shader_version.major < 4)
- vkd3d_shader_build_varying_map(&vs_program->signature_info.output,
- &ps_program->signature_info.input, &args->u.vs.varying_count, args->u.vs.varying_map);
+ vkd3d_shader_build_varying_map(&vs_program->signature_info.output,
+ &ps_program->signature_info.input, &args->u.vs.varying_count, args->u.vs.varying_map);
}
break;
}
Module: wine
Branch: master
Commit: 6505403e58a67ac02b2587f442ac68184935f3f5
URL: https://gitlab.winehq.org/wine/wine/-/commit/6505403e58a67ac02b2587f442ac68…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com>
Date: Fri Mar 15 11:56:30 2024 +0800
win32u: Fix a possible condition that makes EnumDisplayMonitors() not reporting any monitors.
When there are two monitors and they are mirrored, both of them are considered primary. When the
first primary monitor happens to be a clone, EnumDisplayMonitors() ends up not reporting any
monitors because should_enumerate_monitor() returns FALSE and we break out the loop to enumerate
primary monitors after that.
This is a regression from b59619d and my review comments. My indent was to break out of the loop
after finding the *master* primary monitor, not cloned primary monitors, to avoid unnecessary
iterations. However, the primary monitor count is small and it's cleaner this way so let's break
when should_enumerate_monitor() returns TRUE.
---
dlls/win32u/sysparams.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index 7cefb3822a3..d2f7396971b 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -3459,8 +3459,10 @@ BOOL WINAPI NtUserEnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc
{
if (!is_monitor_primary( monitor )) continue;
if (should_enumerate_monitor( monitor, &origin, &limit, &enum_info[count].rect ))
+ {
enum_info[count++].handle = monitor->handle;
- break;
+ break;
+ }
}
/* then non-primary monitors */
Module: wine
Branch: master
Commit: 1600f2e6bd0d4624dad10f61d08439aca967ce95
URL: https://gitlab.winehq.org/wine/wine/-/commit/1600f2e6bd0d4624dad10f61d08439…
Author: Andrew Nguyen <arethusa26(a)gmail.com>
Date: Wed Mar 13 22:51:23 2024 -0500
ddraw: Release only valid texture parents on ddraw_texture_init failure.
When ddraw_texture_init needs to clean up on failure, it will call the
wined3d_texture_get_sub_resource_parent function on draw_texture in
order to retrieve its parent for a IDirectDrawSurface release call.
However, if draw_texture is NULL, then the function call will crash
due to a null pointer dereference.
Therefore, on failure cleanup, the release operation on the texture
parent should only be performed if draw_texture is not NULL.
This fixes a crash in the Virtual Insanity game demo.
---
dlls/ddraw/surface.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index d0c4bf67cbc..a096c5d7d8e 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -6519,15 +6519,17 @@ static HRESULT ddraw_texture_init(struct ddraw_texture *texture, struct ddraw *d
fail:
if (draw_texture)
+ {
wined3d_texture_decref(draw_texture);
- parent = wined3d_texture_get_sub_resource_parent(draw_texture, 0);
- if (texture->version == 7)
- IDirectDrawSurface7_Release(&parent->IDirectDrawSurface7_iface);
- else if (texture->version == 4)
- IDirectDrawSurface4_Release(&parent->IDirectDrawSurface4_iface);
- else
- IDirectDrawSurface_Release(&parent->IDirectDrawSurface_iface);
+ parent = wined3d_texture_get_sub_resource_parent(draw_texture, 0);
+ if (texture->version == 7)
+ IDirectDrawSurface7_Release(&parent->IDirectDrawSurface7_iface);
+ else if (texture->version == 4)
+ IDirectDrawSurface4_Release(&parent->IDirectDrawSurface4_iface);
+ else
+ IDirectDrawSurface_Release(&parent->IDirectDrawSurface_iface);
+ }
return hr;
}