mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 18:43:37 +00:00
wined3d: Use raw blits in wined3d_device_copy_resource().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
786ebbdec3
commit
ac689f0ac9
|
@ -2045,14 +2045,14 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
|||
struct wined3d_context *context;
|
||||
struct wined3d_bo_address addr;
|
||||
|
||||
if (op->flags)
|
||||
if (op->flags & ~WINED3D_BLT_RAW)
|
||||
{
|
||||
FIXME("Flags %#x not implemented for %s resources.\n",
|
||||
op->flags, debug_d3dresourcetype(op->dst_resource->type));
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (op->src_resource->format != op->dst_resource->format)
|
||||
if (!(op->flags & WINED3D_BLT_RAW) && op->src_resource->format != op->dst_resource->format)
|
||||
{
|
||||
FIXME("Format conversion not implemented for %s resources.\n",
|
||||
debug_d3dresourcetype(op->dst_resource->type));
|
||||
|
|
|
@ -4041,7 +4041,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
|
|||
{
|
||||
wined3d_box_set(&box, 0, 0, src_resource->size, 1, 0, 1);
|
||||
wined3d_cs_emit_blt_sub_resource(device->cs, dst_resource, 0, &box,
|
||||
src_resource, 0, &box, 0, NULL, WINED3D_TEXF_POINT);
|
||||
src_resource, 0, &box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4068,7 +4068,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
|
|||
unsigned int idx = j * dst_texture->level_count + i;
|
||||
|
||||
wined3d_cs_emit_blt_sub_resource(device->cs, dst_resource, idx, &box,
|
||||
src_resource, idx, &box, 0, NULL, WINED3D_TEXF_POINT);
|
||||
src_resource, idx, &box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3073,7 +3073,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
|||
same_sub_resource = FALSE;
|
||||
dst_format = dst_texture->resource.format;
|
||||
dst_fmt_flags = dst_texture->resource.format_flags;
|
||||
if (dst_texture->resource.format->id != src_texture->resource.format->id)
|
||||
if (!(flags & WINED3D_BLT_RAW) && dst_texture->resource.format->id != src_texture->resource.format->id)
|
||||
{
|
||||
if (!(converted_texture = surface_convert_format(src_texture, src_sub_resource_idx, dst_format)))
|
||||
{
|
||||
|
@ -3108,6 +3108,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
|||
dst_map.data = context_map_bo_address(context, &dst_data,
|
||||
dst_texture->sub_resources[dst_sub_resource_idx].size, GL_PIXEL_UNPACK_BUFFER, 0);
|
||||
}
|
||||
flags &= ~WINED3D_BLT_RAW;
|
||||
|
||||
bpp = dst_format->byte_count;
|
||||
src_height = src_box->bottom - src_box->top;
|
||||
|
@ -3737,7 +3738,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
|||
|
||||
static const DWORD simple_blit = WINED3D_BLT_SRC_CKEY
|
||||
| WINED3D_BLT_SRC_CKEY_OVERRIDE
|
||||
| WINED3D_BLT_ALPHA_TEST;
|
||||
| WINED3D_BLT_ALPHA_TEST
|
||||
| WINED3D_BLT_RAW;
|
||||
|
||||
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
|
||||
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
|
||||
|
@ -3908,7 +3910,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
|||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
else if (!scale && !convert)
|
||||
else if ((flags & WINED3D_BLT_RAW) || (!scale && !convert))
|
||||
{
|
||||
blit_op = WINED3D_BLIT_OP_RAW_BLIT;
|
||||
}
|
||||
|
|
|
@ -1342,6 +1342,7 @@ enum wined3d_shader_byte_code_format
|
|||
#define WINED3D_BLT_SRC_CKEY_OVERRIDE 0x00010000
|
||||
#define WINED3D_BLT_WAIT 0x01000000
|
||||
#define WINED3D_BLT_DO_NOT_WAIT 0x08000000
|
||||
#define WINED3D_BLT_RAW 0x20000000
|
||||
#define WINED3D_BLT_SYNCHRONOUS 0x40000000
|
||||
#define WINED3D_BLT_ALPHA_TEST 0x80000000
|
||||
#define WINED3D_BLT_MASK 0x0901e800
|
||||
|
|
Loading…
Reference in a new issue