Commit 2adae568 authored by Jan Sikorski's avatar Jan Sikorski Committed by Alexandre Julliard

wined3d: Pass format id for typeless resolve through wined3d_blt_fx.

parent 51f7c9d1
...@@ -1686,7 +1686,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt(IDirectDrawSurface *i ...@@ -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 *dst_impl = impl_from_IDirectDrawSurface(iface);
struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface); 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 unsupported_flags;
DWORD fill_colour = 0; DWORD fill_colour = 0;
HRESULT hr = DD_OK; HRESULT hr = DD_OK;
......
...@@ -5166,6 +5166,7 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, ...@@ -5166,6 +5166,7 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device,
{ {
struct wined3d_texture *dst_texture, *src_texture; struct wined3d_texture *dst_texture, *src_texture;
unsigned int dst_level, src_level; unsigned int dst_level, src_level;
struct wined3d_blt_fx fx = {0};
RECT dst_rect, src_rect; RECT dst_rect, src_rect;
TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, " 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, ...@@ -5192,6 +5193,8 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device,
return; return;
} }
fx.resolve_format_id = format_id;
dst_texture = texture_from_resource(dst_resource); dst_texture = texture_from_resource(dst_resource);
src_texture = texture_from_resource(src_resource); src_texture = texture_from_resource(src_resource);
...@@ -5202,7 +5205,7 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, ...@@ -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), 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_get_level_height(src_texture, src_level));
wined3d_texture_blt(dst_texture, dst_sub_resource_idx, &dst_rect, 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, HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
......
...@@ -1509,6 +1509,7 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_ ...@@ -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", TRACE("src_color_key {0x%08x, 0x%08x}.\n",
fx->src_color_key.color_space_low_value, fx->src_color_key.color_space_low_value,
fx->src_color_key.color_space_high_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]; dst_sub_resource = &dst_texture->sub_resources[dst_sub_resource_idx];
......
...@@ -2014,6 +2014,7 @@ struct wined3d_blt_fx ...@@ -2014,6 +2014,7 @@ struct wined3d_blt_fx
DWORD fx; DWORD fx;
struct wined3d_color_key dst_color_key; struct wined3d_color_key dst_color_key;
struct wined3d_color_key src_color_key; struct wined3d_color_key src_color_key;
enum wined3d_format_id resolve_format_id;
}; };
struct wined3d_buffer_desc struct wined3d_buffer_desc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment