Re: [PATCH] ddraw: add dsurface dimension tests, try 2
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Overall, did you check if there is a capability reporting problem? The game may have the bad size from our DDSCAPS structure. Even if this is a capability problem I think this test is relevant. Am 2013-11-17 20:19, schrieb Patrick Rudolph:
dlls/ddraw/tests/dsurface.c | 88 +++++++++++++++++++++++++++++++++++++++++++++
Please add new tests to ddraw{1, 2, 4, 7}.c, and if possible implement them for all ddraw versions.
+ ZeroMemory(&desc, sizeof(desc)); memset(desc, 0, sizeof(desc)); is preferred.
+ if(!(ddcaps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) + { + todo_wine ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface with width 0xffff and height 1 returned %08x\n", ret); + } Is there any situation in which wine enters this codepath? I think the todo_wine is not needed here.
+ /* Test out of memory surface size */ + ZeroMemory(&desc, sizeof(desc)); + desc.dwSize = sizeof(desc); + desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; + desc.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY; + desc.dwHeight = 0xffff; + desc.dwWidth = 0xffff; + /* this should allocate 4.29 Gbyte of video memory */ Testing DDSCAPS_SYSTEMMEMORY might show some interesting results as well, especially in a Win64 executable.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSijXyAAoJEN0/YqbEcdMwolYP+wWH7o7Dn9LjmjJq0dca5ZD9 EKfyGNxrtg/Th1o2qKdP4rmsl1G8UC96Xo2BP9Fi5tH9BZTzAXTiq2pfSiKGf0Z7 l48UbVGVuVd/nxBG8ULZDS7e8b9h+NwcprM3flWW6frbqsDMxf1LPhtNsEQU8gnE 0/hFXW/T33FkPP3XiBK6vCgWjP1umK9clcQHvit7DitFpFBmwOj5SxktoIsoPVpL TcOiaaXKcABTbKCz4xclOaAMM7k94cH0ByJBVu+8OXNTOHzd0xbtrnFl6UZi74jH dQyqLIyQ4uDs1760He7WtwgMEeF4NhV+u3A6qRP3eLceSf59OhEhSUNGKu5yduVb F16yGgQiTIKHpqtD1sT1RPEDAZgUYL9Uq8BnUrPbNZ+FJI5ZwIbY7KghozAhUweA /TC9VMLwUnJKk8v/8xHPY1WI3474Pht4joahUNWkTQ8QuN7ms44IyyyALBsWM3gF eOSTBNEcWZz+3uRaS68/ZDeqzo+R+dwmwU8XTeWEMTxuy30x1OdCTp3BgR8YNXMa 2uLWa5mL4pkOAVJ6gI6HHPpX8T582lB3PcZgRMd5QirwIg76dwvnk6zpiv4RqFS5 3HCCey4c3FO4aFhDcelkNsdcpCMbaGyv4lqtLDzBe7bR5xOrtWvmdl5r3vvlCbO2 uERNPhePZ8ogI6buwboM =v8j0 -----END PGP SIGNATURE-----
On 18 November 2013 16:44, Stefan Dösinger <stefandoesinger(a)gmail.com> wrote:
Overall, did you check if there is a capability reporting problem? The game may have the bad size from our DDSCAPS structure.
Related to that, I don't think the maximum texture size can be larger than the maximum surface size, and there's a small chance that the surface's memory pool has some influence on this.
participants (2)
-
Henri Verbeet -
Stefan Dösinger