From: Michael Müller michael@fds-team.de
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/ddraw/tests/ddraw7.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index c199994d52..d695e968c9 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -346,6 +346,19 @@ static HRESULT WINAPI enum_devtype_cb(char *desc_str, char *name, D3DDEVICEDESC7 return DDENUMRET_OK; }
+static HRESULT WINAPI enum_devtype_software_cb(char *desc_str, char *name, D3DDEVICEDESC7 *desc, void *ctx) +{ + BOOL *software_ok = ctx; + if (IsEqualGUID(&desc->deviceGUID, &IID_IDirect3DRGBDevice)) + { + todo_wine ok(!(desc->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT), + "RGB emulation device shouldn't have HWTRANSFORMANDLIGHT flag\n"); + *software_ok = TRUE; + return DDENUMRET_CANCEL; + } + return DDENUMRET_OK; +} + static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level) { IDirectDrawSurface7 *surface, *ds; @@ -356,6 +369,7 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level) IDirect3D7 *d3d7; HRESULT hr; BOOL hal_ok = FALSE; + BOOL software_ok = FALSE; const GUID *devtype = &IID_IDirect3DHALDevice;
if (!(ddraw = create_ddraw())) @@ -399,6 +413,10 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level) ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr); if (hal_ok) devtype = &IID_IDirect3DTnLHalDevice;
+ hr = IDirect3D7_EnumDevices(d3d7, enum_devtype_software_cb , &software_ok); + ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr); + if (!software_ok) win_skip("RGB device not found, unable to check flags\n"); + memset(&z_fmt, 0, sizeof(z_fmt)); hr = IDirect3D7_EnumZBufferFormats(d3d7, devtype, enum_z_fmt, &z_fmt); if (FAILED(hr) || !z_fmt.dwSize)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=50143
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
Hi Vijay,
On Sat, 30 Mar 2019 at 01:28, Vijay Kiran Kamuju infyquest@gmail.com wrote:
@@ -399,6 +413,10 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level) ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr); if (hal_ok) devtype = &IID_IDirect3DTnLHalDevice;
- hr = IDirect3D7_EnumDevices(d3d7, enum_devtype_software_cb , &software_ok);
- ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
- if (!software_ok) win_skip("RGB device not found, unable to check flags\n");
I don't think it's useful to test this for each create_device() call. Also, how about the other ddraw versions and different device types like e.g. Ramp and MMX devices?
Hi Henri,
I will checked the tests for ddraw1..4 but could not find a way. With your help may be I will be able to write tests for them too. I will also check for other device types.
--- Vijay
On Tue, Apr 2, 2019 at 6:22 PM Henri Verbeet hverbeet@gmail.com wrote:
Hi Vijay,
On Sat, 30 Mar 2019 at 01:28, Vijay Kiran Kamuju infyquest@gmail.com wrote:
@@ -399,6 +413,10 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level) ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr); if (hal_ok) devtype = &IID_IDirect3DTnLHalDevice;
- hr = IDirect3D7_EnumDevices(d3d7, enum_devtype_software_cb , &software_ok);
- ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
- if (!software_ok) win_skip("RGB device not found, unable to check flags\n");
I don't think it's useful to test this for each create_device() call. Also, how about the other ddraw versions and different device types like e.g. Ramp and MMX devices?