wined3d: Allow layered clears.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2021-02-24 22:57:04 +01:00 committed by Alexandre Julliard
parent 8c91486e75
commit 25e07835a2
3 changed files with 4 additions and 10 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);