From 25e07835a22aef93415ceb0e921deac25630f987 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 24 Feb 2021 22:57:04 +0100 Subject: [PATCH] wined3d: Allow layered clears. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d10core/tests/d3d10core.c | 4 ++-- dlls/d3d11/tests/d3d11.c | 4 ++-- dlls/wined3d/device.c | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index e8915aea8e7..a5b2620d98a 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -11235,12 +11235,12 @@ static void test_clear_render_target_view_2d(void) get_texture_readback(texture, 0, &rb); colour = get_readback_color(&rb, 8, 8); - todo_wine ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08x.\n", colour); release_resource_readback(&rb); get_texture_readback(texture, 1, &rb); colour = get_readback_color(&rb, 8, 8); - todo_wine ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08x.\n", colour); release_resource_readback(&rb); get_texture_readback(texture, 2, &rb); diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index efbad45b35d..a331baf48a0 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -15565,12 +15565,12 @@ static void test_clear_render_target_view_2d(void) get_texture_readback(texture, 0, &rb); colour = get_readback_color(&rb, 8, 8, 0); - todo_wine ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08x.\n", colour); release_resource_readback(&rb); get_texture_readback(texture, 1, &rb); colour = get_readback_color(&rb, 8, 8, 0); - todo_wine ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08x.\n", colour); release_resource_readback(&rb); get_texture_readback(texture, 2, &rb); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7405a38e13b..aaf91a03947 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5093,12 +5093,6 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi return WINED3DERR_INVALIDCALL; } - if (view->layer_count != max(1, resource->depth >> view->desc.u.texture.level_idx)) - { - FIXME("Layered clears not implemented.\n"); - return WINED3DERR_INVALIDCALL; - } - if (!rect) { SetRect(&r, 0, 0, view->width, view->height);