d3d11: Support NULL views in d3d10_device_ClearDepthStencilView().
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d3f8efe546
commit
75ef613e82
@ -22,6 +22,8 @@
|
||||
#include "wine/test.h"
|
||||
#include <limits.h>
|
||||
|
||||
static BOOL d3d11_available;
|
||||
|
||||
struct vec2
|
||||
{
|
||||
float x, y;
|
||||
@ -478,6 +480,8 @@ static void test_feature_level(void)
|
||||
return;
|
||||
}
|
||||
|
||||
d3d11_available = TRUE;
|
||||
|
||||
/* Device was created by D3D10CreateDevice. */
|
||||
feature_level = ID3D11Device_GetFeatureLevel(device11);
|
||||
ok(feature_level == D3D_FEATURE_LEVEL_10_0, "Got unexpected feature level %#x.\n", feature_level);
|
||||
@ -6222,6 +6226,14 @@ static void test_clear_depth_stencil_view(void)
|
||||
ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH | D3D10_CLEAR_STENCIL, 0.0f, 0);
|
||||
check_texture_color(depth_texture, 0x00000000, 0);
|
||||
|
||||
if (d3d11_available)
|
||||
{
|
||||
ID3D10Device_ClearDepthStencilView(device, NULL, D3D10_CLEAR_DEPTH | D3D10_CLEAR_STENCIL, 1.0f, 0xff);
|
||||
check_texture_color(depth_texture, 0x00000000, 0);
|
||||
}
|
||||
else
|
||||
win_skip("D3D11 is not available, skipping test.\n");
|
||||
|
||||
ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0xff);
|
||||
todo_wine check_texture_color(depth_texture, 0x00ffffff, 0);
|
||||
|
||||
|
@ -3463,6 +3463,9 @@ static void STDMETHODCALLTYPE d3d10_device_ClearDepthStencilView(ID3D10Device1 *
|
||||
TRACE("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u.\n",
|
||||
iface, depth_stencil_view, flags, depth, stencil);
|
||||
|
||||
if (!view)
|
||||
return;
|
||||
|
||||
wined3d_flags = wined3d_clear_flags_from_d3d11_clear_flags(flags);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user