wined3d: Advertise AUTOGENMIPMAP only for renderable and filterable formats.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cc7c6928da
commit
25a8773d21
|
@ -6963,7 +6963,6 @@ static void test_mipmap_gen(void)
|
|||
D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, formats[i]));
|
||||
hr = IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
|
||||
D3DUSAGE_AUTOGENMIPMAP, D3DRTYPE_TEXTURE, formats[i]);
|
||||
todo_wine_if (!renderable && hr == D3D_OK)
|
||||
ok((hr == D3D_OK && renderable) || hr == D3DOK_NOAUTOGEN,
|
||||
"Got unexpected hr %#x for %srenderable format %#x.\n",
|
||||
hr, renderable ? "" : "non", formats[i]);
|
||||
|
|
|
@ -5364,7 +5364,9 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
|
|||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
if ((usage & WINED3DUSAGE_AUTOGENMIPMAP) && !gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
if ((usage & WINED3DUSAGE_AUTOGENMIPMAP) && (!gl_info->supported[SGIS_GENERATE_MIPMAP]
|
||||
|| (format->flags[gl_type] & (WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_FILTERING))
|
||||
!= (WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_FILTERING)))
|
||||
{
|
||||
TRACE("No WINED3DUSAGE_AUTOGENMIPMAP support, returning WINED3DOK_NOAUTOGEN.\n");
|
||||
return WINED3DOK_NOAUTOGEN;
|
||||
|
|
Loading…
Reference in New Issue