Module: wine Branch: master Commit: 5fa3e9b8298f89e636e1d167bae54aee6f7e0872 URL: https://gitlab.winehq.org/wine/wine/-/commit/5fa3e9b8298f89e636e1d167bae54ae...
Author: Elizabeth Figura zfigura@codeweavers.com Date: Tue May 14 23:08:02 2024 -0500
wined3d: Fix inversion in shader_get_position_fixup().
Spotted by Matteo Bruni.
Fixes: ba2f78922f84f0576694fef17be7bec2cc9da19b
---
dlls/wined3d/wined3d_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 510bc057d9f..757c6638645 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4340,7 +4340,7 @@ static inline void shader_get_position_fixup(const struct wined3d_context *conte for (i = 0; i < fixup_count; ++i) { position_fixup[4 * i ] = 1.0f; - position_fixup[4 * i + 1] = 1.0f; + position_fixup[4 * i + 1] = -1.0f; if (!context->d3d_info->subpixel_viewport) { double dummy; @@ -4348,7 +4348,7 @@ static inline void shader_get_position_fixup(const struct wined3d_context *conte y = modf(state->viewports[i].y, &dummy) * 2.0f; } position_fixup[4 * i + 2] = (center_offset + x) / state->viewports[i].width; - position_fixup[4 * i + 3] = -(center_offset + y) / state->viewports[i].height; + position_fixup[4 * i + 3] = (center_offset + y) / state->viewports[i].height; } }