https://bugs.winehq.org/show_bug.cgi?id=56671
Bug ID: 56671 Summary: Disney Ratatouille demo renders upside down on Intel graphics Product: Wine Version: 9.8 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: d3d Assignee: wine-bugs@winehq.org Reporter: alexhenrie24@gmail.com Distribution: ---
Created attachment 76455 --> https://bugs.winehq.org/attachment.cgi?id=76455 Screenshot of the main menu
A recent regression is causing the Disney Ratatouille demo to render upside down on my laptop that has an Intel i7-1360P processor and integrated graphics. Interestingly, the game renders right-side-up on my desktop that has an AMD Radeon RX 5500 XT. Both the laptop and the desktop have Arch Linux.
Steps to reproduce:
1. Create an empty directory and download EN_Ratatouille_Demo.exe into it.
2. Run `wine EN_Ratatouille_Demo.exe` to extract the installer.
3. Run `wine setup.exe` to install the Ratatouille demo.
4. Run `cd "$HOME/.wine/drive_c/Program Files (x86)/THQ/Disney-Pixar/Ratatouille Demo/Rat"` to enter the game directory.
5. Run `wine GameSetup.exe` to start the game launcher.
6. Click Play.
Observe that everything is upside down, from the intro videos to the main menu.
`git bisect` says:
ba2f78922f84f0576694fef17be7bec2cc9da19b is the first bad commit commit ba2f78922f84f0576694fef17be7bec2cc9da19b Author: Elizabeth Figura zfigura@codeweavers.com AuthorDate: Fri Mar 15 18:59:35 2024 -0500 Commit: Alexandre Julliard julliard@winehq.org CommitDate: Sun May 12 16:25:54 2024 +0200
wined3d: Remove no longer used support for drawing to an onscreen render target.
Now that we require ORM_FBO, wined3d backbuffers are always offscreen (and we never draw directly to the frontbuffer, which is the only truly onscreen surface).
We could reintroduce support for drawing directly to the backbuffer, and this would presumably improve performance by avoiding a blit from the wined3d backbuffer to the real GL backbuffer.
However, this is not always possible or performant due to mismatching dimensions, or the need to use a depth buffer which is also used with offscreen RTVs, and for d3d1-9 it may not be possible at all due to issues related to preserving invariance between flipped and non-flipped geometry.
It *may* be possible to identify situations where we can render directly to the backbuffer for d3d10+, but at that point we can rely on the Vulkan backend to work, and given other unfixable performance problems with the GL backend (most notably the inability to properly stream index buffer data) it does not really make much sense to go out of our way to perform such a minor optimization there.
dlls/wined3d/adapter_gl.c | 1 - dlls/wined3d/arb_program_shader.c | 4 ++-- dlls/wined3d/context_gl.c | 101 ++++++++++++++++++++++++++++++----------------------------------------------------------------------- dlls/wined3d/ffp_gl.c | 95 ++++++++++++++++++++++------------------------------------------------------------------------- dlls/wined3d/glsl_shader.c | 4 ++-- dlls/wined3d/shader.c | 4 ++-- dlls/wined3d/utils.c | 2 +- dlls/wined3d/wined3d_private.h | 10 +--------- 8 files changed, 60 insertions(+), 161 deletions(-)
$ sha256sum EN_Ratatouille_Demo.exe b8fcd1385ef47883987df0ae3c05b2acbd83f70bede43bcf8567e6a7aa2629c0