wined3d: Introduce WINED3D_TEXTURE_DOWNLOADABLE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ebe31c7919
commit
af8401ba0c
|
@ -2522,9 +2522,8 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
|
|||
TRACE("Not doing download because of format conversion.\n");
|
||||
else if (src_texture->resource.format->conv_byte_count)
|
||||
TRACE("Not doing download because the source format needs conversion.\n");
|
||||
else if (wined3d_texture_gl_is_multisample_location(wined3d_texture_gl(src_texture),
|
||||
WINED3D_LOCATION_TEXTURE_RGB))
|
||||
TRACE("Not doing download because of multisample source.\n");
|
||||
else if (!(src_texture->flags & WINED3D_TEXTURE_DOWNLOADABLE))
|
||||
TRACE("Not doing download because texture is not downloadable.\n");
|
||||
else if (!texture2d_is_full_rect(src_texture, src_sub_resource_idx % src_texture->level_count, &src_rect))
|
||||
TRACE("Not doing download because of partial download (src).\n");
|
||||
else if (!texture2d_is_full_rect(dst_texture, dst_sub_resource_idx % dst_texture->level_count, &dst_rect))
|
||||
|
|
|
@ -1602,9 +1602,15 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
|||
if (texture->texture_ops == &texture_gl_ops)
|
||||
{
|
||||
if (multisample_type && gl_info->supported[ARB_TEXTURE_MULTISAMPLE])
|
||||
{
|
||||
wined3d_texture_gl(texture)->target = GL_TEXTURE_2D_MULTISAMPLE;
|
||||
texture->flags &= ~WINED3D_TEXTURE_DOWNLOADABLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
wined3d_texture_gl(texture)->target = GL_TEXTURE_2D;
|
||||
texture->flags |= WINED3D_TEXTURE_DOWNLOADABLE;
|
||||
}
|
||||
}
|
||||
|
||||
if (((width & (width - 1)) || (height & (height - 1))) && !d3d_info->texture_npot
|
||||
|
@ -3223,7 +3229,8 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
|||
texture->layer_count = layer_count;
|
||||
texture->level_count = level_count;
|
||||
texture->lod = 0;
|
||||
texture->flags |= WINED3D_TEXTURE_POW2_MAT_IDENT | WINED3D_TEXTURE_NORMALIZED_COORDS;
|
||||
texture->flags |= WINED3D_TEXTURE_POW2_MAT_IDENT | WINED3D_TEXTURE_NORMALIZED_COORDS
|
||||
| WINED3D_TEXTURE_DOWNLOADABLE;
|
||||
if (flags & WINED3D_TEXTURE_CREATE_GET_DC_LENIENT)
|
||||
texture->flags |= WINED3D_TEXTURE_PIN_SYSMEM | WINED3D_TEXTURE_GET_DC_LENIENT;
|
||||
if (flags & (WINED3D_TEXTURE_CREATE_GET_DC | WINED3D_TEXTURE_CREATE_GET_DC_LENIENT))
|
||||
|
@ -3658,6 +3665,9 @@ HRESULT wined3d_texture_gl_init(struct wined3d_texture_gl *texture_gl, struct wi
|
|||
if (texture_gl->t.resource.gl_type == WINED3D_GL_RES_TYPE_TEX_RECT)
|
||||
texture_gl->target = GL_TEXTURE_RECTANGLE_ARB;
|
||||
|
||||
if (texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY || texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE)
|
||||
texture_gl->t.flags &= ~WINED3D_TEXTURE_DOWNLOADABLE;
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -3506,6 +3506,7 @@ struct wined3d_texture_ops
|
|||
#define WINED3D_TEXTURE_DISCARD 0x00002000
|
||||
#define WINED3D_TEXTURE_GET_DC 0x00004000
|
||||
#define WINED3D_TEXTURE_GENERATE_MIPMAPS 0x00008000
|
||||
#define WINED3D_TEXTURE_DOWNLOADABLE 0x00010000
|
||||
|
||||
#define WINED3D_TEXTURE_ASYNC_COLOR_KEY 0x00000001
|
||||
|
||||
|
|
Loading…
Reference in New Issue