ddraw: DDSCAPS_ALLOCONLOAD requires DDSCAPS_TEXTURE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6dc5d194ad
commit
4d94a1e651
|
@ -5733,9 +5733,10 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
|||
return DDERR_INVALIDCAPS;
|
||||
}
|
||||
|
||||
if ((desc->ddsCaps.dwCaps & DDSCAPS_MIPMAP) && !(desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
if ((desc->ddsCaps.dwCaps & (DDSCAPS_ALLOCONLOAD | DDSCAPS_MIPMAP))
|
||||
&& !(desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
{
|
||||
WARN("DDSCAPS_MIPMAP requested without DDSCAPS_TEXTURE.\n");
|
||||
WARN("Caps %#x require DDSCAPS_TEXTURE.\n", desc->ddsCaps.dwCaps);
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return DDERR_INVALIDCAPS;
|
||||
}
|
||||
|
|
|
@ -4930,15 +4930,22 @@ static void test_create_surface_pitch(void)
|
|||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDPARAMS,
|
||||
0, 0, 0 },
|
||||
/* 10 */
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
/* 15 */
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDPARAMS,
|
||||
0, 0, 0 },
|
||||
|
|
|
@ -5972,15 +5972,22 @@ static void test_create_surface_pitch(void)
|
|||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDPARAMS,
|
||||
0, 0, 0 },
|
||||
/* 10 */
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
/* 15 */
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDPARAMS,
|
||||
0, 0, 0 },
|
||||
|
|
|
@ -7512,12 +7512,19 @@ static void test_create_surface_pitch(void)
|
|||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN,
|
||||
DDSD_LPSURFACE | DDSD_PITCH | DDSD_LINEARSIZE, 0x100, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0x100},
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
/* 20 */
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
|
|
|
@ -7360,12 +7360,19 @@ static void test_create_surface_pitch(void)
|
|||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN,
|
||||
DDSD_LPSURFACE | DDSD_PITCH | DDSD_LINEARSIZE, 0x100, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0x100},
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
DDSD_LPSURFACE | DDSD_PITCH, 0x100, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DDERR_INVALIDCAPS,
|
||||
0, 0, 0 },
|
||||
/* 20 */
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_ALLOCONLOAD,
|
||||
0, 0, DD_OK,
|
||||
DDSD_PITCH, 0x100, 0 },
|
||||
|
|
Loading…
Reference in New Issue