Commit d3714688 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Allow (some) blits with fixups in the arbfp and ffp blitters with ORM_BACKBUFFER.

When using ORM_BACKBUFFER, formats with fixups may need to be loaded into WINED3D_LOCATION_DRAWABLE. Before commit cad4badb, surface_load_drawable() would always use the device blitter, without checking whether the blitter actually supports the blit. The FBO blitter would be able to handle these blits, but is unavailable when using ORM_BACKBUFFER. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e2a251a0
...@@ -7767,6 +7767,12 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info, ...@@ -7767,6 +7767,12 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info,
/* We only support YUV conversions. */ /* We only support YUV conversions. */
if (!is_complex_fixup(src_format->color_fixup)) if (!is_complex_fixup(src_format->color_fixup))
{ {
if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER)
{
WARN("Claiming fixup support because of ORM_BACKBUFFER.\n");
return TRUE;
}
TRACE("[FAILED]\n"); TRACE("[FAILED]\n");
return FALSE; return FALSE;
} }
......
...@@ -2485,8 +2485,8 @@ static void ffp_blitter_destroy(struct wined3d_blitter *blitter, struct wined3d_ ...@@ -2485,8 +2485,8 @@ static void ffp_blitter_destroy(struct wined3d_blitter *blitter, struct wined3d_
static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info,
const struct wined3d_d3d_info *d3d_info, enum wined3d_blit_op blit_op, const struct wined3d_d3d_info *d3d_info, enum wined3d_blit_op blit_op,
DWORD src_usage, enum wined3d_pool src_pool, const struct wined3d_format *src_format, DWORD src_usage, enum wined3d_pool src_pool, const struct wined3d_format *src_format, DWORD src_location,
DWORD dst_usage, enum wined3d_pool dst_pool, const struct wined3d_format *dst_format) DWORD dst_usage, enum wined3d_pool dst_pool, const struct wined3d_format *dst_format, DWORD dst_location)
{ {
BOOL decompress; BOOL decompress;
...@@ -2521,8 +2521,16 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, ...@@ -2521,8 +2521,16 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info,
if (!is_identity_fixup(src_format->color_fixup) if (!is_identity_fixup(src_format->color_fixup)
|| !is_identity_fixup(dst_format->color_fixup)) || !is_identity_fixup(dst_format->color_fixup))
{ {
TRACE("Fixups are not supported.\n"); if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER
return FALSE; && dst_format->id == src_format->id && dst_location == WINED3D_LOCATION_DRAWABLE)
{
WARN("Claiming fixup support because of ORM_BACKBUFFER.\n");
}
else
{
TRACE("Fixups are not supported.\n");
return FALSE;
}
} }
if (!(dst_usage & WINED3DUSAGE_RENDERTARGET)) if (!(dst_usage & WINED3DUSAGE_RENDERTARGET))
...@@ -2632,8 +2640,8 @@ static void ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit_ ...@@ -2632,8 +2640,8 @@ static void ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit_
device = dst_resource->device; device = dst_resource->device;
if (!ffp_blit_supported(&device->adapter->gl_info, &device->adapter->d3d_info, op, if (!ffp_blit_supported(&device->adapter->gl_info, &device->adapter->d3d_info, op,
src_resource->usage, src_resource->pool, src_resource->format, src_resource->usage, src_resource->pool, src_resource->format, src_location,
dst_resource->usage, dst_resource->pool, dst_resource->format)) dst_resource->usage, dst_resource->pool, dst_resource->format, dst_location))
{ {
if ((next = blitter->next)) if ((next = blitter->next))
next->ops->blitter_blit(next, op, context, src_surface, src_location, next->ops->blitter_blit(next, op, context, src_surface, src_location,
......
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