Re: [PATCH] ddraw: add dsurface dimension tests, try 2
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.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSi0EoAAoJEN0/YqbEcdMwsooP/08okrmj6tVaiDYQq69fPwFZ I+U4xyZDSuyx3Gq2e9NBgvj3UfL5HykLnE7HU574zG/0FrbOK+bLHtyrozVusYt9 8dvFSExPF+1aOS2Mnvtv4PVnrDU/om1my4YJm7ntfnqQgdGBNinLa/Hk6T6C/JAS /17d0v5IPoaPUFEGJa2A0ks+ohJZrqHujGlf3rzJ4NESWbxErYsHma5eVG1VTnsr BBg4KdtqthgpmHi4aQd/r/xBtaP+AsnTLdQP2fPJe1k8rUj9SMtE2XNZaDrcFoOJ /5WP+Mp/GuBl7hY6ICCAL8BSAaWlJmEyOJiUrRFKxgupyF8Sc6jm3cnfFidu6hOE zxw28/0eZC5P3HJvSwWO/cyEK7W4J55DhE+2Ga+oncbgChWjroUux02U0VVKFRWz S1Xfm5TQMeghXGZBaACIkbTgGrTfxJksNfQKQAWoZOlxaJW0SgnWOuWu+/GLaH0h wC5cV7hOjXCNxSGPiKC8pQT8H161qY+hGZUniVh4/++dvHhzesAFcAtIXu8gh/55 ACaSnCoHNNj1hxbRrDo3IP/nvz0xc5XNytBfHRKMU4PePbzGcGHuFW3IegNWLTJc ZOq72Zt/wYE7YlazKDR8V0JNiuT5NgiYfGzTqM2nzrSpubt8pLxUhRkmQYTIJ94T MaZfYrWaeofW2GzdcLd7 =6MUW -----END PGP SIGNATURE-----
participants (2)
-
Patrick Rudolph -
Stefan Dösinger