=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Get rid of wined3d_check_render_target_format().
Alexandre Julliard
julliard at winehq.org
Fri Mar 29 16:28:12 CDT 2019
Module: wine
Branch: master
Commit: 80f343e49765bf1aba36402dd6619f39f37e0a4a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=80f343e49765bf1aba36402dd6619f39f37e0a4a
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Fri Mar 29 13:00:17 2019 +0100
wined3d: Get rid of wined3d_check_render_target_format().
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/directx.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index fbbda18..7053d70 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1388,16 +1388,6 @@ static BOOL wined3d_check_depth_stencil_format(const struct wined3d_adapter *ada
return adapter->adapter_ops->adapter_check_format(adapter, adapter_format, NULL, ds_format);
}
-static BOOL wined3d_check_render_target_format(const struct wined3d_adapter *adapter,
- const struct wined3d_format *adapter_format, const struct wined3d_format *rt_format,
- enum wined3d_gl_resource_type gl_type)
-{
- if (!(rt_format->flags[gl_type] & WINED3DFMT_FLAG_RENDERTARGET))
- return FALSE;
-
- return adapter->adapter_ops->adapter_check_format(adapter, adapter_format, rt_format, NULL);
-}
-
static BOOL wined3d_check_surface_format(const struct wined3d_format *format)
{
if ((format->flags[WINED3D_GL_RES_TYPE_TEX_2D] | format->flags[WINED3D_GL_RES_TYPE_RB]) & WINED3DFMT_FLAG_BLIT)
@@ -1539,6 +1529,8 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
if (bind_flags & WINED3D_BIND_SHADER_RESOURCE)
format_flags |= WINED3DFMT_FLAG_TEXTURE;
+ if (bind_flags & WINED3D_BIND_RENDER_TARGET)
+ format_flags |= WINED3DFMT_FLAG_RENDERTARGET;
if (usage & WINED3DUSAGE_QUERY_FILTER)
format_flags |= WINED3DFMT_FLAG_FILTERING;
if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING)
@@ -1568,7 +1560,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
}
if ((bind_flags & WINED3D_BIND_RENDER_TARGET)
- && !wined3d_check_render_target_format(adapter, adapter_format, format, gl_type))
+ && !adapter->adapter_ops->adapter_check_format(adapter, adapter_format, format, NULL))
{
TRACE("Requested WINED3D_BIND_RENDER_TARGET, but format %s is not supported for render targets.\n",
debug_d3dformat(check_format_id));
More information about the wine-cvs
mailing list