The texture tracking in d3d9 was not correct for applications using stateblocks.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- For bug 44871.
dlls/d3d9/d3d9_private.h | 1 - dlls/d3d9/device.c | 23 ++++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 38fe06cab1b..c50aabf593f 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -101,7 +101,6 @@ struct d3d9_device UINT index_buffer_size; UINT index_buffer_pos;
- struct d3d9_texture *textures[D3D9_MAX_TEXTURE_UNITS]; struct d3d9_surface *render_targets[D3D_MAX_SIMULTANEOUS_RENDERTARGETS];
LONG device_state; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2265c1dca29..d533afb9b3e 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -981,10 +981,6 @@ static HRESULT d3d9_device_reset(struct d3d9_device *device, device->device_state = D3D9_DEVICE_STATE_OK; }
- if (!device->d3d_parent->extended) - for (i = 0; i < ARRAY_SIZE(device->textures); ++i) - device->textures[i] = NULL; - rtv = wined3d_device_get_rendertarget_view(device->wined3d_device, 0); device->render_targets[0] = wined3d_rendertarget_view_get_sub_resource_parent(rtv); for (i = 1; i < ARRAY_SIZE(device->render_targets); ++i) @@ -2402,13 +2398,6 @@ static HRESULT WINAPI d3d9_device_SetTexture(IDirect3DDevice9Ex *iface, DWORD st wined3d_mutex_lock(); hr = wined3d_device_set_texture(device->wined3d_device, stage, texture_impl ? texture_impl->wined3d_texture : NULL); - if (SUCCEEDED(hr)) - { - unsigned int i = stage >= D3DVERTEXTEXTURESAMPLER0 ? stage - D3DVERTEXTEXTURESAMPLER0 + 16 : stage; - - if (stage < ARRAY_SIZE(device->textures)) - device->textures[i] = texture_impl; - } wined3d_mutex_unlock();
return hr; @@ -2652,11 +2641,15 @@ static float WINAPI d3d9_device_GetNPatchMode(IDirect3DDevice9Ex *iface) /* wined3d critical section must be taken by the caller. */ static void d3d9_generate_auto_mipmaps(struct d3d9_device *device) { - unsigned int i; + struct wined3d_texture *texture; + unsigned int i, stage;
- for (i = 0; i < ARRAY_SIZE(device->textures); ++i) - if (device->textures[i]) - d3d9_texture_gen_auto_mipmap(device->textures[i]); + for (i = 0; i < D3D9_MAX_TEXTURE_UNITS; ++i) + { + stage = i >= 16 ? i - 16 + D3DVERTEXTEXTURESAMPLER0 : i; + if ((texture = wined3d_device_get_texture(device->wined3d_device, stage))) + d3d9_texture_gen_auto_mipmap(wined3d_texture_get_parent(texture)); + } }
static HRESULT WINAPI d3d9_device_DrawPrimitive(IDirect3DDevice9Ex *iface,
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/ddraw/viewport.c | 197 +++++++++++++++++++++----------------------------- 1 file changed, 82 insertions(+), 115 deletions(-)
diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 758ceeaf119..61b313800ba 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -249,109 +249,93 @@ static HRESULT WINAPI d3d_viewport_Initialize(IDirect3DViewport3 *iface, IDirect return DDERR_ALREADYINITIALIZED; }
-/***************************************************************************** - * IDirect3DViewport3::GetViewport - * - * Returns the viewport data assigned to this viewport interface - * - * Params: - * Data: Address to store the data - * - * Returns: - * D3D_OK on success - * DDERR_INVALIDPARAMS if Data is NULL - * - *****************************************************************************/ -static HRESULT WINAPI d3d_viewport_GetViewport(IDirect3DViewport3 *iface, D3DVIEWPORT *lpData) +static HRESULT WINAPI d3d_viewport_GetViewport(IDirect3DViewport3 *iface, D3DVIEWPORT *vp) { - struct d3d_viewport *This = impl_from_IDirect3DViewport3(iface); - DWORD dwSize; + struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); + DWORD size;
- TRACE("iface %p, data %p.\n", iface, lpData); + TRACE("iface %p, vp %p.\n", iface, vp); + + if (!vp) + return DDERR_INVALIDPARAMS;
wined3d_mutex_lock();
- dwSize = lpData->dwSize; - if (!This->use_vp2) - memcpy(lpData, &(This->viewports.vp1), dwSize); - else { + size = vp->dwSize; + if (!viewport->use_vp2) + { + memcpy(vp, &viewport->viewports.vp1, size); + } + else + { D3DVIEWPORT vp1; + vp1.dwSize = sizeof(vp1); - vp1.dwX = This->viewports.vp2.dwX; - vp1.dwY = This->viewports.vp2.dwY; - vp1.dwWidth = This->viewports.vp2.dwWidth; - vp1.dwHeight = This->viewports.vp2.dwHeight; + vp1.dwX = viewport->viewports.vp2.dwX; + vp1.dwY = viewport->viewports.vp2.dwY; + vp1.dwWidth = viewport->viewports.vp2.dwWidth; + vp1.dwHeight = viewport->viewports.vp2.dwHeight; vp1.dvMaxX = 0.0; vp1.dvMaxY = 0.0; vp1.dvScaleX = 0.0; vp1.dvScaleY = 0.0; - vp1.dvMinZ = This->viewports.vp2.dvMinZ; - vp1.dvMaxZ = This->viewports.vp2.dvMaxZ; - memcpy(lpData, &vp1, dwSize); + vp1.dvMinZ = viewport->viewports.vp2.dvMinZ; + vp1.dvMaxZ = viewport->viewports.vp2.dvMaxZ; + memcpy(vp, &vp1, size); }
if (TRACE_ON(ddraw)) { TRACE(" returning D3DVIEWPORT :\n"); - _dump_D3DVIEWPORT(lpData); + _dump_D3DVIEWPORT(vp); }
wined3d_mutex_unlock();
- return DD_OK; + return D3D_OK; }
-/***************************************************************************** - * IDirect3DViewport3::SetViewport - * - * Sets the viewport information for this interface - * - * Params: - * lpData: Viewport to set - * - * Returns: - * D3D_OK on success - * DDERR_INVALIDPARAMS if Data is NULL - * - *****************************************************************************/ -static HRESULT WINAPI d3d_viewport_SetViewport(IDirect3DViewport3 *iface, D3DVIEWPORT *lpData) +static HRESULT WINAPI d3d_viewport_SetViewport(IDirect3DViewport3 *iface, D3DVIEWPORT *vp) { - struct d3d_viewport *This = impl_from_IDirect3DViewport3(iface); + struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); + struct d3d_device *device = viewport->active_device; IDirect3DViewport3 *current_viewport;
- TRACE("iface %p, data %p.\n", iface, lpData); + TRACE("iface %p, vp %p.\n", iface, vp); + + if (!vp) + return DDERR_INVALIDPARAMS;
if (TRACE_ON(ddraw)) { TRACE(" getting D3DVIEWPORT :\n"); - _dump_D3DVIEWPORT(lpData); + _dump_D3DVIEWPORT(vp); }
wined3d_mutex_lock();
- This->use_vp2 = 0; - memset(&(This->viewports.vp1), 0, sizeof(This->viewports.vp1)); - memcpy(&(This->viewports.vp1), lpData, lpData->dwSize); + viewport->use_vp2 = 0; + memset(&viewport->viewports.vp1, 0, sizeof(viewport->viewports.vp1)); + memcpy(&viewport->viewports.vp1, vp, vp->dwSize);
- /* Tests on two games show that these values are never used properly so override - them with proper ones :-) - */ - This->viewports.vp1.dvMinZ = 0.0; - This->viewports.vp1.dvMaxZ = 1.0; + /* Empirical testing on a couple of d3d1 games showed that these values + * should be ignored. */ + viewport->viewports.vp1.dvMinZ = 0.0; + viewport->viewports.vp1.dvMaxZ = 1.0;
- if (This->active_device) + if (device) { - IDirect3DDevice3 *d3d_device3 = &This->active_device->IDirect3DDevice3_iface; - if (SUCCEEDED(IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport))) + if (SUCCEEDED(IDirect3DDevice3_GetCurrentViewport(&device->IDirect3DDevice3_iface, ¤t_viewport))) { - if (current_viewport == iface) viewport_activate(This, FALSE); + if (current_viewport == iface) + viewport_activate(viewport, FALSE); IDirect3DViewport3_Release(current_viewport); } }
wined3d_mutex_unlock();
- return DD_OK; + return D3D_OK; }
/***************************************************************************** @@ -882,53 +866,44 @@ static HRESULT WINAPI d3d_viewport_NextLight(IDirect3DViewport3 *iface, * IDirect3DViewport2 Methods. *****************************************************************************/
-/***************************************************************************** - * IDirect3DViewport3::GetViewport2 - * - * Returns the currently set viewport in a D3DVIEWPORT2 structure. - * Similar to IDirect3DViewport3::GetViewport - * - * Params: - * lpData: Pointer to the structure to fill - * - * Returns: - * D3D_OK on success - * DDERR_INVALIDPARAMS if the viewport was set with - * IDirect3DViewport3::SetViewport - * DDERR_INVALIDPARAMS if Data is NULL - * - *****************************************************************************/ -static HRESULT WINAPI d3d_viewport_GetViewport2(IDirect3DViewport3 *iface, D3DVIEWPORT2 *lpData) +static HRESULT WINAPI d3d_viewport_GetViewport2(IDirect3DViewport3 *iface, D3DVIEWPORT2 *vp) { - struct d3d_viewport *This = impl_from_IDirect3DViewport3(iface); - DWORD dwSize; + struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); + DWORD size; + + TRACE("iface %p, vp %p.\n", iface, vp);
- TRACE("iface %p, data %p.\n", iface, lpData); + if (!vp) + return DDERR_INVALIDPARAMS;
wined3d_mutex_lock(); - dwSize = lpData->dwSize; - if (This->use_vp2) - memcpy(lpData, &(This->viewports.vp2), dwSize); - else { + size = vp->dwSize; + if (viewport->use_vp2) + { + memcpy(vp, &viewport->viewports.vp2, size); + } + else + { D3DVIEWPORT2 vp2; + vp2.dwSize = sizeof(vp2); - vp2.dwX = This->viewports.vp1.dwX; - vp2.dwY = This->viewports.vp1.dwY; - vp2.dwWidth = This->viewports.vp1.dwWidth; - vp2.dwHeight = This->viewports.vp1.dwHeight; + vp2.dwX = viewport->viewports.vp1.dwX; + vp2.dwY = viewport->viewports.vp1.dwY; + vp2.dwWidth = viewport->viewports.vp1.dwWidth; + vp2.dwHeight = viewport->viewports.vp1.dwHeight; vp2.dvClipX = 0.0; vp2.dvClipY = 0.0; vp2.dvClipWidth = 0.0; vp2.dvClipHeight = 0.0; - vp2.dvMinZ = This->viewports.vp1.dvMinZ; - vp2.dvMaxZ = This->viewports.vp1.dvMaxZ; - memcpy(lpData, &vp2, dwSize); + vp2.dvMinZ = viewport->viewports.vp1.dvMinZ; + vp2.dvMaxZ = viewport->viewports.vp1.dvMaxZ; + memcpy(vp, &vp2, size); }
if (TRACE_ON(ddraw)) { TRACE(" returning D3DVIEWPORT2 :\n"); - _dump_D3DVIEWPORT2(lpData); + _dump_D3DVIEWPORT2(vp); }
wined3d_mutex_unlock(); @@ -936,43 +911,35 @@ static HRESULT WINAPI d3d_viewport_GetViewport2(IDirect3DViewport3 *iface, D3DVI return D3D_OK; }
-/***************************************************************************** - * IDirect3DViewport3::SetViewport2 - * - * Sets the viewport from a D3DVIEWPORT2 structure - * - * Params: - * lpData: Viewport to set - * - * Returns: - * D3D_OK on success - * - *****************************************************************************/ -static HRESULT WINAPI d3d_viewport_SetViewport2(IDirect3DViewport3 *iface, D3DVIEWPORT2 *lpData) +static HRESULT WINAPI d3d_viewport_SetViewport2(IDirect3DViewport3 *iface, D3DVIEWPORT2 *vp) { - struct d3d_viewport *This = impl_from_IDirect3DViewport3(iface); + struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); + struct d3d_device *device = viewport->active_device; IDirect3DViewport3 *current_viewport;
- TRACE("iface %p, data %p.\n", iface, lpData); + TRACE("iface %p, vp %p.\n", iface, vp); + + if (!vp) + return DDERR_INVALIDPARAMS;
if (TRACE_ON(ddraw)) { TRACE(" getting D3DVIEWPORT2 :\n"); - _dump_D3DVIEWPORT2(lpData); + _dump_D3DVIEWPORT2(vp); }
wined3d_mutex_lock();
- This->use_vp2 = 1; - memset(&(This->viewports.vp2), 0, sizeof(This->viewports.vp2)); - memcpy(&(This->viewports.vp2), lpData, lpData->dwSize); + viewport->use_vp2 = 1; + memset(&viewport->viewports.vp2, 0, sizeof(viewport->viewports.vp2)); + memcpy(&viewport->viewports.vp2, vp, vp->dwSize);
- if (This->active_device) + if (device) { - IDirect3DDevice3 *d3d_device3 = &This->active_device->IDirect3DDevice3_iface; - if (SUCCEEDED(IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport))) + if (SUCCEEDED(IDirect3DDevice3_GetCurrentViewport(&device->IDirect3DDevice3_iface, ¤t_viewport))) { - if (current_viewport == iface) viewport_activate(This, FALSE); + if (current_viewport == iface) + viewport_activate(viewport, FALSE); IDirect3DViewport3_Release(current_viewport); } }
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Only for d3d device version 2 and above, as the (upcoming) tests show.
dlls/ddraw/viewport.c | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 61b313800ba..0bc746e974f 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -915,7 +915,10 @@ static HRESULT WINAPI d3d_viewport_SetViewport2(IDirect3DViewport3 *iface, D3DVI { struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); struct d3d_device *device = viewport->active_device; + struct wined3d_sub_resource_desc rt_desc; + struct wined3d_rendertarget_view *rtv; IDirect3DViewport3 *current_viewport; + struct ddraw_surface *surface;
TRACE("iface %p, vp %p.\n", iface, vp);
@@ -928,20 +931,42 @@ static HRESULT WINAPI d3d_viewport_SetViewport2(IDirect3DViewport3 *iface, D3DVI _dump_D3DVIEWPORT2(vp); }
+ if (!device) + { + WARN("Viewport not bound to a device, returning D3DERR_VIEWPORTHASNODEVICE.\n"); + return D3DERR_VIEWPORTHASNODEVICE; + } + wined3d_mutex_lock();
+ if (device->version > 1) + { + if (!(rtv = wined3d_device_get_rendertarget_view(device->wined3d_device, 0))) + { + wined3d_mutex_unlock(); + return DDERR_INVALIDCAPS; + } + surface = wined3d_rendertarget_view_get_sub_resource_parent(rtv); + wined3d_texture_get_sub_resource_desc(surface->wined3d_texture, surface->sub_resource_idx, &rt_desc); + + if (vp->dwX > rt_desc.width || vp->dwWidth > rt_desc.width - vp->dwX + || vp->dwY > rt_desc.height || vp->dwHeight > rt_desc.height - vp->dwY) + { + WARN("Invalid viewport, returning DDERR_INVALIDPARAMS.\n"); + wined3d_mutex_unlock(); + return DDERR_INVALIDPARAMS; + } + } + viewport->use_vp2 = 1; memset(&viewport->viewports.vp2, 0, sizeof(viewport->viewports.vp2)); memcpy(&viewport->viewports.vp2, vp, vp->dwSize);
- if (device) + if (SUCCEEDED(IDirect3DDevice3_GetCurrentViewport(&device->IDirect3DDevice3_iface, ¤t_viewport))) { - if (SUCCEEDED(IDirect3DDevice3_GetCurrentViewport(&device->IDirect3DDevice3_iface, ¤t_viewport))) - { - if (current_viewport == iface) - viewport_activate(viewport, FALSE); - IDirect3DViewport3_Release(current_viewport); - } + if (current_viewport == iface) + viewport_activate(viewport, FALSE); + IDirect3DViewport3_Release(current_viewport); }
wined3d_mutex_unlock();
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/ddraw/tests/ddraw4.c | 239 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 233 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 550d73a1bd2..3547d3a4be7 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -266,6 +266,43 @@ static D3DCOLOR get_surface_color(IDirectDrawSurface4 *surface, UINT x, UINT y) return color; }
+static void check_rect(IDirectDrawSurface4 *surface, RECT r, const char *message) +{ + LONG x_coords[2][2] = + { + {r.left - 1, r.left + 1}, + {r.right + 1, r.right - 1}, + }; + LONG y_coords[2][2] = + { + {r.top - 1, r.top + 1}, + {r.bottom + 1, r.bottom - 1} + }; + unsigned int i, j, x_side, y_side; + + for (i = 0; i < 2; ++i) + { + for (j = 0; j < 2; ++j) + { + for (x_side = 0; x_side < 2; ++x_side) + { + for (y_side = 0; y_side < 2; ++y_side) + { + LONG x = x_coords[i][x_side], y = y_coords[j][y_side]; + DWORD color; + DWORD expected = (x_side == 1 && y_side == 1) ? 0x00ffffff : 0x00000000; + + if (x < 0 || x >= 640 || y < 0 || y >= 480) + continue; + color = get_surface_color(surface, x, y); + ok(color == expected, "%s: Pixel (%d, %d) has color %08x, expected %08x\n", + message, x, y, color, expected); + } + } + } + } +} + static HRESULT CALLBACK enum_z_fmt(DDPIXELFORMAT *format, void *ctx) { DDPIXELFORMAT *z_fmt = ctx; @@ -365,7 +402,7 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) return NULL; }
- hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); + hr = IDirectDrawSurface4_AddAttachedSurface(surface, ds); ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); IDirectDrawSurface4_Release(ds); if (FAILED(hr)) @@ -1491,7 +1528,7 @@ static ULONG get_refcount(IUnknown *test_iface) return IUnknown_Release(test_iface); }
-static void test_viewport(void) +static void test_viewport_object(void) { IDirectDraw4 *ddraw; IDirect3D3 *d3d; @@ -12224,9 +12261,9 @@ static void test_edge_antialiasing_blending(void) ok(hr == D3D_OK, "Creating the offscreen render target failed, hr %#x.\n", hr);
ds = get_depth_stencil(device); - hr = IDirectDrawSurface_AddAttachedSurface(offscreen, ds); + hr = IDirectDrawSurface4_AddAttachedSurface(offscreen, ds); todo_wine ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); - IDirectDrawSurface_Release(ds); + IDirectDrawSurface4_Release(ds);
hr = IDirect3DDevice3_SetRenderTarget(device, offscreen, 0); ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); @@ -12349,7 +12386,7 @@ static void test_edge_antialiasing_blending(void) ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color);
IDirectDrawSurface4_Release(offscreen); - IDirectDraw3_Release(ddraw); + IDirectDraw4_Release(ddraw); destroy_viewport(device, viewport); refcount = IDirect3DDevice3_Release(device); ok(!refcount, "Device has %u references left.\n", refcount); @@ -14751,6 +14788,195 @@ static void test_enum_surfaces(void) IDirectDraw4_Release(ddraw); }
+static void test_viewport(void) +{ + static struct + { + D3DVIEWPORT7 vp; + RECT expected_rect; + const char *message; + } + tests[] = + { + {{ 0, 0, 640, 480}, { 0, 120, 479, 359}, "Viewport (0, 0) - (640, 480)"}, + {{ 0, 0, 320, 240}, { 0, 60, 239, 179}, "Viewport (0, 0) - (320, 240)"}, + {{ 0, 0, 1280, 960}, { 0, 240, 639, 479}, "Viewport (0, 0) - (1280, 960)"}, + {{ 0, 0, 2000, 1600}, { 0, 400, 639, 479}, "Viewport (0, 0) - (2000, 1600)"}, + {{100, 100, 640, 480}, {100, 220, 579, 459}, "Viewport (100, 100) - (640, 480)"}, + {{ 0, 0, 8192, 8192}, {-10, -10, -10, -10}, "Viewport (0, 0) - (8192, 8192)"}, + }; + static const struct vec2 rt_sizes[] = + { + {640, 480}, {1280, 960}, {320, 240}, {800, 600}, + }; + static D3DMATRIX mat = + { + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }; + static struct vec3 quad[] = + { + {-1.5f, -0.5f, 0.1f}, + {-1.5f, 0.5f, 0.1f}, + { 0.5f, -0.5f, 0.1f}, + { 0.5f, 0.5f, 0.1f}, + }; + IDirect3DViewport3 *viewport, *full_viewport; + IDirectDrawSurface4 *rt, *ds; + DDSURFACEDESC2 surface_desc; + IDirect3DDevice3 *device; + BOOL expected_failure; + IDirectDraw4 *ddraw; + DDPIXELFORMAT z_fmt; + D3DRECT clear_rect; + unsigned int i, j; + IDirect3D3 *d3d; + D3DVIEWPORT2 vp; + ULONG refcount; + HWND window; + HRESULT hr; + + window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, 0, 0, 0, 0); + if (!(device = create_device(window, DDSCL_NORMAL))) + { + skip("Failed to create a 3D device, skipping test.\n"); + DestroyWindow(window); + return; + } + + hr = IDirect3DDevice3_GetDirect3D(device, &d3d); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + + hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); + ok(SUCCEEDED(hr), "Failed to disable depth test, hr %#x.\n", hr); + hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + + hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + + ds = get_depth_stencil(device); + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + hr = IDirectDrawSurface4_GetSurfaceDesc(ds, &surface_desc); + z_fmt = U4(surface_desc).ddpfPixelFormat; + + for (i = 0; i < sizeof(rt_sizes) / sizeof(rt_sizes[0]); ++i) + { + if (i) + { + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + surface_desc.dwWidth = rt_sizes[i].x; + surface_desc.dwHeight = rt_sizes[i].y; + surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; + hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &rt, NULL); + ok(SUCCEEDED(hr), "Failed to create render target, hr %#x (i %u).\n", hr, i); + + surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; + surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; + U4(surface_desc).ddpfPixelFormat = z_fmt; + hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &ds, NULL); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x (i %u).\n", hr, i); + hr = IDirectDrawSurface4_AddAttachedSurface(rt, ds); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x (i %u).\n", hr, i); + + hr = IDirect3DDevice3_SetRenderTarget(device, rt, 0); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + } + else + { + hr = IDirect3DDevice3_GetRenderTarget(device, &rt); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + } + + full_viewport = create_viewport(device, 0, 0, rt_sizes[i].x, rt_sizes[i].y); + + U1(clear_rect).x1 = U2(clear_rect).y1 = 0; + U3(clear_rect).x2 = rt_sizes[i].x; + U4(clear_rect).y2 = rt_sizes[i].y; + + for (j = 0; j < sizeof(tests) / sizeof(tests[0]); ++j) + { + expected_failure = tests[j].vp.dwX + tests[j].vp.dwWidth > rt_sizes[i].x + || tests[j].vp.dwY + tests[j].vp.dwHeight > rt_sizes[i].y; + + hr = IDirect3DViewport3_Clear2(full_viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff000000, 0.0f, 0); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x (i %u, j %u).\n", hr, i, j); + + hr = IDirect3D3_CreateViewport(d3d, &viewport, NULL); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x (i %u, j %u).\n", hr, i, j); + hr = IDirect3DViewport3_SetViewport2(viewport, NULL); + ok(hr == E_INVALIDARG, "Setting NULL viewport data returned unexpected hr %#x (i %u, j %u).\n", hr, i, j); + memset(&vp, 0, sizeof(vp)); + vp.dwSize = sizeof(vp); + vp.dwX = tests[j].vp.dwX; + vp.dwY = tests[j].vp.dwY; + vp.dwWidth = tests[j].vp.dwWidth; + vp.dwHeight = tests[j].vp.dwHeight; + vp.dvClipX = -1.0f; + vp.dvClipY = 1.0f; + vp.dvClipWidth = 2.0f; + vp.dvClipHeight = 2.0f; + vp.dvMinZ = 0.0f; + vp.dvMaxZ = 1.0f; + hr = IDirect3DViewport3_SetViewport2(viewport, &vp); + ok(hr == D3DERR_VIEWPORTHASNODEVICE, + "Setting viewport data returned unexpected hr %#x (i %u, j %u).\n", hr, i, j); + hr = IDirect3DDevice3_AddViewport(device, viewport); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x (i %u, j %u).\n", hr, i, j); + hr = IDirect3DViewport3_SetViewport2(viewport, &vp); + if (expected_failure) + ok(hr == E_INVALIDARG, + "Setting viewport data returned unexpected hr %#x (i %u, j %u).\n", hr, i, j); + else + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x (i %u, j %u).\n", hr, i, j); + + hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); + ok(SUCCEEDED(hr), "Failed to set the viewport, hr %#x (i %u, j %u).\n", hr, i, j); + if (expected_failure) + { + destroy_viewport(device, viewport); + continue; + } + + hr = IDirect3DDevice3_BeginScene(device); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x (i %u, j %u).\n", hr, i, j); + hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); + ok(SUCCEEDED(hr), "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + hr = IDirect3DDevice3_EndScene(device); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x (i %u, j %u).\n", hr, i, j); + + check_rect(rt, tests[j].expected_rect, tests[j].message); + + destroy_viewport(device, viewport); + } + + destroy_viewport(device, full_viewport); + + hr = IDirectDrawSurface4_DeleteAttachedSurface(rt, 0, ds); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x (i %u).\n", hr, i); + IDirectDrawSurface4_Release(ds); + + IDirectDrawSurface4_Release(rt); + } + + refcount = IDirect3DDevice3_Release(device); + IDirect3D3_Release(d3d); + ok(!refcount, "Device has %u references left.\n", refcount); + DestroyWindow(window); +} + START_TEST(ddraw4) { DDDEVICEIDENTIFIER identifier; @@ -14797,7 +15023,7 @@ START_TEST(ddraw4) test_coop_level_threaded(); test_depth_blit(); test_texture_load_ckey(); - test_viewport(); + test_viewport_object(); test_zenable(); test_ck_rgba(); test_ck_default(); @@ -14875,4 +15101,5 @@ START_TEST(ddraw4) test_depth_readback(); test_clear(); test_enum_surfaces(); + test_viewport(); }
On 13 April 2018 at 00:07, Matteo Bruni mbruni@codeweavers.com wrote:
- for (i = 0; i < sizeof(rt_sizes) / sizeof(rt_sizes[0]); ++i)
- {
That should probably use the ARRAY_SIZE macro.
2018-04-13 20:05 GMT+02:00 Henri Verbeet hverbeet@gmail.com:
On 13 April 2018 at 00:07, Matteo Bruni mbruni@codeweavers.com wrote:
- for (i = 0; i < sizeof(rt_sizes) / sizeof(rt_sizes[0]); ++i)
- {
That should probably use the ARRAY_SIZE macro.
Argh, I noticed and fixed that on at least another test patch, missed it here...
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- These render states were only introduced in newer d3d versions.
dlls/ddraw/tests/ddraw1.c | 2 -- dlls/ddraw/tests/ddraw2.c | 13 ------------- dlls/ddraw/tests/ddraw4.c | 22 ---------------------- 3 files changed, 37 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index c63ddee5e9f..4c2e703a994 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -5952,7 +5952,6 @@ static void test_lighting(void) emit_set_ts(&ptr, D3DTRANSFORMSTATE_WORLD, world_handle); emit_set_ts(&ptr, D3DTRANSFORMSTATE_VIEW, view_handle); emit_set_ts(&ptr, D3DTRANSFORMSTATE_PROJECTION, proj_handle); - emit_set_rs(&ptr, D3DRENDERSTATE_CLIPPING, FALSE); emit_set_rs(&ptr, D3DRENDERSTATE_ZENABLE, FALSE); emit_set_rs(&ptr, D3DRENDERSTATE_FOGENABLE, FALSE); emit_set_rs(&ptr, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); @@ -8327,7 +8326,6 @@ static void test_shademode(void) quad = tests[i].primtype == D3DPT_TRIANGLESTRIP ? quad_strip : quad_list; memcpy(exec_desc.lpData, quad, sizeof(quad_strip)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(quad_strip); - emit_set_rs(&ptr, D3DRENDERSTATE_CLIPPING, FALSE); emit_set_rs(&ptr, D3DRENDERSTATE_ZENABLE, FALSE); emit_set_rs(&ptr, D3DRENDERSTATE_FOGENABLE, FALSE); emit_set_rs(&ptr, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 1ab1f9c5911..3bfb1b5785a 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -6924,8 +6924,6 @@ static void test_lighting(void) ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); - hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable zbuffer, hr %#x.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); @@ -7286,8 +7284,6 @@ static void test_specular_lighting(void) ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); - hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); @@ -10624,18 +10620,12 @@ static void test_edge_antialiasing_blending(void) ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); - hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); - hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); - hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); ok(SUCCEEDED(hr), "Failed to enable blending, hr %#x.\n", hr); @@ -12265,9 +12255,6 @@ static void test_depth_readback(void) hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr);
- hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); - ds = get_depth_stencil(device); hr = IDirectDrawSurface_DeleteAttachedSurface(rt, 0, ds); ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 3547d3a4be7..b27d4d42825 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -4022,8 +4022,6 @@ static void test_lighting(void) ok(SUCCEEDED(hr), "Failed to set view transformation, hr %#x.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); ok(SUCCEEDED(hr), "Failed to set projection transformation, hr %#x.\n", hr); - hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable zbuffer, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); @@ -4389,8 +4387,6 @@ static void test_specular_lighting(void) ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); - hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); @@ -10335,8 +10331,6 @@ static void test_texcoordindex(void) ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 1, texture2); ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); - hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); @@ -10518,8 +10512,6 @@ static void test_colorkey_precision(void) hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr);
- hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); @@ -11671,8 +11663,6 @@ static void test_color_clamping(void) ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); - hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); @@ -11681,8 +11671,6 @@ static void test_color_clamping(void) ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); - hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0xff404040); ok(SUCCEEDED(hr), "Failed to set texture factor, hr %#x.\n", hr); @@ -12278,8 +12266,6 @@ static void test_edge_antialiasing_blending(void) ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); - hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); @@ -12288,8 +12274,6 @@ static void test_edge_antialiasing_blending(void) ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); - hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); ok(SUCCEEDED(hr), "Failed to enable blending, hr %#x.\n", hr); @@ -14252,9 +14236,6 @@ static void test_map_synchronisation(void) hr = IDirect3DVertexBuffer_Unlock(buffer); ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr);
- hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); - /* Initial draw to initialise states, compile shaders, etc. */ hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); @@ -14413,9 +14394,6 @@ static void test_depth_readback(void) hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr);
- hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); - ds = get_depth_stencil(device); hr = IDirectDrawSurface4_DeleteAttachedSurface(rt, 0, ds); ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr);
Hi,
While running your changed tests on Windows, 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=37662
Your paranoid android.
=== wvistau64 (32 bit ddraw1) === ddraw1.c:2660: Test failed: Expected message 0x46, but didn't receive it. ddraw1.c:2662: Test failed: Expected screen size 1024x768, got 0x0. ddraw1.c:2668: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2698: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2705: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2731: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2754: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2783: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2809: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2829: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2865: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2875: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2901: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2924: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2946: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2972: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:2992: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw1.c:3029: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746).
=== w1064 (32 bit ddraw1) === ddraw1.c:10296: Test failed: Got unexpected color 0x00ffffff. ddraw1.c:10316: Test failed: Got unexpected color 0x00ffffff.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com