wined3d: Disallow empty surfaces.
This commit is contained in:
parent
2fb7edc325
commit
4f651808fc
|
@ -10613,11 +10613,8 @@ static void depth_bounds_test(IDirect3DDevice9 *device)
|
|||
|
||||
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32,
|
||||
MAKEFOURCC('N','V','D','B'), D3DPOOL_DEFAULT, &offscreen_surface, NULL);
|
||||
todo_wine ok(hr != D3D_OK, "Able to create surface, hr = %08x\n", hr);
|
||||
if(offscreen_surface)
|
||||
{
|
||||
IDirect3DSurface9_Release(offscreen_surface);
|
||||
}
|
||||
ok(FAILED(hr), "Able to create surface, hr %#x.\n", hr);
|
||||
if (offscreen_surface) IDirect3DSurface9_Release(offscreen_surface);
|
||||
|
||||
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0, 0);
|
||||
ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr);
|
||||
|
|
|
@ -353,6 +353,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
|
|||
/* FIXME: Check that the format is supported by the device. */
|
||||
|
||||
resource_size = wined3d_format_calculate_size(format, alignment, width, height);
|
||||
if (!resource_size) return WINED3DERR_INVALIDCALL;
|
||||
|
||||
/* Look at the implementation and set the correct Vtable. */
|
||||
switch (surface_type)
|
||||
|
|
Loading…
Reference in New Issue