wined3d: Implement copying for 1D textures.
1D textures are handled by raw and CPU blitter. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
130b6ed876
commit
16517e4eea
|
@ -7701,6 +7701,9 @@ static BOOL arbfp_blit_supported(enum wined3d_blit_op blit_op, const struct wine
|
|||
if (!context->gl_info->supported[ARB_FRAGMENT_PROGRAM])
|
||||
return FALSE;
|
||||
|
||||
if (src_resource->type != WINED3D_RTYPE_TEXTURE_2D)
|
||||
return FALSE;
|
||||
|
||||
if (blit_op == WINED3D_BLIT_OP_RAW_BLIT && dst_format->id == src_format->id)
|
||||
{
|
||||
if (dst_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
|
|
|
@ -2080,13 +2080,6 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
|||
buffer_from_resource(op->src_resource), op->src_box.left,
|
||||
op->src_box.right - op->src_box.left);
|
||||
}
|
||||
else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_2D)
|
||||
{
|
||||
if (FAILED(texture2d_blt(texture_from_resource(op->dst_resource), op->dst_sub_resource_idx,
|
||||
&op->dst_box, texture_from_resource(op->src_resource), op->src_sub_resource_idx,
|
||||
&op->src_box, op->flags, &op->fx, op->filter)))
|
||||
FIXME("Blit failed.\n");
|
||||
}
|
||||
else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_3D)
|
||||
{
|
||||
struct wined3d_texture *src_texture, *dst_texture;
|
||||
|
@ -2165,7 +2158,10 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
|||
}
|
||||
else
|
||||
{
|
||||
FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(op->dst_resource->type));
|
||||
if (FAILED(texture2d_blt(texture_from_resource(op->dst_resource), op->dst_sub_resource_idx,
|
||||
&op->dst_box, texture_from_resource(op->src_resource), op->src_sub_resource_idx,
|
||||
&op->src_box, op->flags, &op->fx, op->filter)))
|
||||
FIXME("Blit failed.\n");
|
||||
}
|
||||
|
||||
error:
|
||||
|
|
|
@ -12481,6 +12481,9 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (src_resource->type != WINED3D_RTYPE_TEXTURE_2D)
|
||||
return FALSE;
|
||||
|
||||
if (src_texture->target == GL_TEXTURE_2D_MULTISAMPLE
|
||||
|| dst_texture->target == GL_TEXTURE_2D_MULTISAMPLE
|
||||
|| src_texture->target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY
|
||||
|
|
|
@ -305,6 +305,9 @@ static BOOL fbo_blitter_supported(enum wined3d_blit_op blit_op, const struct win
|
|||
if (!(src_resource->access & dst_resource->access & WINED3D_RESOURCE_ACCESS_GPU))
|
||||
return FALSE;
|
||||
|
||||
if (src_resource->type != WINED3D_RTYPE_TEXTURE_2D)
|
||||
return FALSE;
|
||||
|
||||
switch (blit_op)
|
||||
{
|
||||
case WINED3D_BLIT_OP_COLOR_BLIT:
|
||||
|
@ -1509,6 +1512,12 @@ static HRESULT wined3d_texture_blt_special(struct wined3d_texture *dst_texture,
|
|||
dst_texture, dst_sub_resource_idx, wine_dbgstr_rect(dst_rect), src_texture, src_sub_resource_idx,
|
||||
wine_dbgstr_rect(src_rect), flags, fx, debug_d3dtexturefiltertype(filter));
|
||||
|
||||
if (dst_texture->resource.type != WINED3D_RTYPE_TEXTURE_2D)
|
||||
{
|
||||
FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(dst_texture->resource.type));
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
/* Get the swapchain. One of the surfaces has to be a primary surface. */
|
||||
if (!(dst_texture->resource.access & WINED3D_RESOURCE_ACCESS_GPU))
|
||||
{
|
||||
|
@ -2171,6 +2180,9 @@ static BOOL ffp_blit_supported(enum wined3d_blit_op blit_op, const struct wined3
|
|||
const struct wined3d_format *dst_format = dst_resource->format;
|
||||
BOOL decompress;
|
||||
|
||||
if (src_resource->type != WINED3D_RTYPE_TEXTURE_2D)
|
||||
return FALSE;
|
||||
|
||||
decompress = src_format && (src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED)
|
||||
&& !(dst_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED);
|
||||
if (!decompress && !(src_resource->access & dst_resource->access & WINED3D_RESOURCE_ACCESS_GPU))
|
||||
|
|
Loading…
Reference in New Issue