From 4cdb03a76e0829f3928b1c3835f91b9949d75070 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 28 Jan 2013 11:15:39 +0100 Subject: [PATCH] wined3d: Get rid of CheckTextureCapability(). --- dlls/wined3d/directx.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 868e3a4e55c..4c3851152da 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3526,12 +3526,6 @@ static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter, return FALSE; } -/* Check if a texture format is supported on the given adapter */ -static BOOL CheckTextureCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) -{ - return format->flags & WINED3DFMT_FLAG_TEXTURE; -} - static BOOL CheckSurfaceCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *adapter_format, const struct wined3d_format *check_format, BOOL no3d) @@ -3568,8 +3562,10 @@ static BOOL CheckSurfaceCapability(const struct wined3d_adapter *adapter, } } - /* All format that are supported for textures are supported for surfaces as well */ - if (CheckTextureCapability(adapter, check_format)) return TRUE; + /* All formats that are supported for textures are supported for surfaces + * as well. */ + if (check_format->flags & WINED3DFMT_FLAG_TEXTURE) + return TRUE; /* All depth stencil formats are supported on surfaces */ if (CheckDepthStencilCapability(adapter, adapter_format, check_format)) return TRUE; @@ -3630,7 +3626,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad return WINED3DERR_NOTAVAILABLE; } - if (!CheckTextureCapability(adapter, format)) + if (!(format->flags & WINED3DFMT_FLAG_TEXTURE)) { TRACE("[FAILED] - Cube texture format not supported.\n"); return WINED3DERR_NOTAVAILABLE; @@ -3789,7 +3785,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad return WINED3DERR_NOTAVAILABLE; } - if (!CheckTextureCapability(adapter, format)) + if (!(format->flags & WINED3DFMT_FLAG_TEXTURE)) { TRACE("[FAILED] - Texture format not supported.\n"); return WINED3DERR_NOTAVAILABLE; @@ -3926,7 +3922,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad return WINED3DERR_NOTAVAILABLE; } - if (!CheckTextureCapability(adapter, format)) + if (!(format->flags & WINED3DFMT_FLAG_TEXTURE)) { TRACE("[FAILED] - Format not supported.\n"); return WINED3DERR_NOTAVAILABLE;