Commit 3c9b8431 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

wined3d: Check if destination texture has GPU access in glsl_blitter_supported().

parent 8d54ca4f
...@@ -12937,14 +12937,20 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi ...@@ -12937,14 +12937,20 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi
return FALSE; return FALSE;
} }
if (!(dst_resource->access & WINED3D_RESOURCE_ACCESS_GPU))
{
TRACE("Destination resource does not have GPU access.\n");
return FALSE;
}
/* We don't necessarily want to blit from resources without /* We don't necessarily want to blit from resources without
* WINED3D_RESOURCE_ACCESS_GPU, but that may be the only way to decompress * WINED3D_RESOURCE_ACCESS_GPU, but that may be the only way to decompress
* compressed textures. */ * compressed textures. */
decompress = (src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED) decompress = (src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED)
&& !(dst_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)) if (!decompress && !(src_resource->access & WINED3D_RESOURCE_ACCESS_GPU))
{ {
TRACE("Source or destination resource does not have GPU access.\n"); TRACE("Source resource does not have GPU access.\n");
return FALSE; return FALSE;
} }
......
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