wined3d: Pass format id for typeless resolve through wined3d_blt_fx.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jan Sikorski 2021-03-31 12:27:36 +02:00 committed by Alexandre Julliard
parent 51f7c9d15e
commit 2adae568a6
4 changed files with 7 additions and 2 deletions

View file

@ -1686,7 +1686,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt(IDirectDrawSurface *i
{
struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface(iface);
struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface);
struct wined3d_blt_fx wined3d_fx;
struct wined3d_blt_fx wined3d_fx = {0};
DWORD unsupported_flags;
DWORD fill_colour = 0;
HRESULT hr = DD_OK;

View file

@ -5166,6 +5166,7 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device,
{
struct wined3d_texture *dst_texture, *src_texture;
unsigned int dst_level, src_level;
struct wined3d_blt_fx fx = {0};
RECT dst_rect, src_rect;
TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, "
@ -5192,6 +5193,8 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device,
return;
}
fx.resolve_format_id = format_id;
dst_texture = texture_from_resource(dst_resource);
src_texture = texture_from_resource(src_resource);
@ -5202,7 +5205,7 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device,
SetRect(&src_rect, 0, 0, wined3d_texture_get_level_width(src_texture, src_level),
wined3d_texture_get_level_height(src_texture, src_level));
wined3d_texture_blt(dst_texture, dst_sub_resource_idx, &dst_rect,
src_texture, src_sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_POINT);
src_texture, src_sub_resource_idx, &src_rect, 0, &fx, WINED3D_TEXF_POINT);
}
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,

View file

@ -1509,6 +1509,7 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
TRACE("src_color_key {0x%08x, 0x%08x}.\n",
fx->src_color_key.color_space_low_value,
fx->src_color_key.color_space_high_value);
TRACE("resolve_format_id %s.\n", debug_d3dformat(fx->resolve_format_id));
}
dst_sub_resource = &dst_texture->sub_resources[dst_sub_resource_idx];

View file

@ -2014,6 +2014,7 @@ struct wined3d_blt_fx
DWORD fx;
struct wined3d_color_key dst_color_key;
struct wined3d_color_key src_color_key;
enum wined3d_format_id resolve_format_id;
};
struct wined3d_buffer_desc