Stefan D��singer (@stefan) commented about dlls/d3drm/tests/d3drm.c:
- hr = IDirect3DDevice_QueryInterface(d3d_device1, &IID_IDirectDrawSurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Cannot get surface to the render target, hr %#lx.\n", hr);
- ret_color = get_surface_color(surface, 320, 240);
- ok(compare_color(ret_color, 0, 1), "Got unexpected color 0x%08lx.\n", ret_color);
- /* Clear uses the scene frame's background color. */
- hr = IDirect3DRMFrame_SetSceneBackground(frame1, 0x00bc614e);
- ok(SUCCEEDED(hr), "Cannot set scene background, hr %#lx\n", hr);
- hr = IDirect3DRMViewport_Clear(viewport1);
- ok(SUCCEEDED(hr), "Cannot clear viewport, hr %#lx.\n", hr);
- ret_color = get_surface_color(surface, 320, 240);
- ok(compare_color(ret_color, 0x00bc614e, 1), "Got unexpected color 0x%08lx.\n", ret_color);
- hr = IDirect3DRMFrame_SetSceneBackground(frame1, 0xdeadbeef);
Afaics this here is what the test adds compared to test_viewport_clear1 and test_viewport_clear2. Set the background color to something else, invoke render() and demonstrate that render() does not clear. You can add this to the two existing tests instead of adding another one.
The point of clear1 and clear2 isn't that they aren't a first and second clear test; clear1 uses IDirect3DRM1 interfaces, clear2 IDirect3DRM2; A "clear3" following the scheme should use IDirect3DRM3 et al.