Am 2013-11-18 16:44, schrieb Stefan Dösinger:
-----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.
I'm not sure. It successfully creates a primary surface with dimension 320x240 and it creates offscreen surfaces with dimension 320x240 and DDSCAPS_SYSTEMMEMORY flag set. Only offscreen surfaces with DDSCAPS_VIDEOMEMORY flag set are out of range. I was wondering: 15728640 = 320 << 16 and 20971520 = 240 << 16. Where does the two byte offset come from ?
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.
I can do that as well.
- 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.
You are right, wine always presents a direct draw device with DDSCAPS_VIDEOMEMORY. I removed ligGL, ddraw still "works", but doesn't render anything.
- /* 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.
I can add tests for this.
-----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-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2013-11-18 19:28, schrieb Patrick Rudolph:
You are right, wine always presents a direct draw device with DDSCAPS_VIDEOMEMORY. I removed ligGL, ddraw still "works", but doesn't render anything.
That's a bug. 2D operation should still work without opengl. It's been broken for a while though and I wonder if anyone still uses this functionality nowadays.