wined3d: Move the ARB_texture_cube_map check to init_format_texture_info.

This commit is contained in:
Stefan Dösinger 2015-04-26 16:09:11 +02:00 committed by Alexandre Julliard
parent 7109bebd02
commit 0d6d64b358
3 changed files with 2 additions and 13 deletions

View File

@ -4430,12 +4430,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
switch (resource_type) switch (resource_type)
{ {
case WINED3D_RTYPE_CUBE_TEXTURE: case WINED3D_RTYPE_CUBE_TEXTURE:
if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP])
{
TRACE("[FAILED] - No cube texture support.\n");
return WINED3DERR_NOTAVAILABLE;
}
format_flags |= WINED3DFMT_FLAG_TEXTURE; format_flags |= WINED3DFMT_FLAG_TEXTURE;
allowed_usage = WINED3DUSAGE_AUTOGENMIPMAP allowed_usage = WINED3DUSAGE_AUTOGENMIPMAP
| WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_DYNAMIC

View File

@ -979,12 +979,6 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP] && desc->pool != WINED3D_POOL_SCRATCH)
{
WARN("(%p) : Tried to create not supported cube texture.\n", texture);
return WINED3DERR_INVALIDCALL;
}
/* Calculate levels for mip mapping */ /* Calculate levels for mip mapping */
if (desc->usage & WINED3DUSAGE_AUTOGENMIPMAP) if (desc->usage & WINED3DUSAGE_AUTOGENMIPMAP)
{ {

View File

@ -1859,7 +1859,8 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
format->flags[WINED3D_GL_RES_TYPE_TEX_2D] |= format_texture_info[i].flags; format->flags[WINED3D_GL_RES_TYPE_TEX_2D] |= format_texture_info[i].flags;
if (gl_info->supported[EXT_TEXTURE3D]) if (gl_info->supported[EXT_TEXTURE3D])
format->flags[WINED3D_GL_RES_TYPE_TEX_3D] |= format_texture_info[i].flags; format->flags[WINED3D_GL_RES_TYPE_TEX_3D] |= format_texture_info[i].flags;
format->flags[WINED3D_GL_RES_TYPE_TEX_CUBE] |= format_texture_info[i].flags; if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
format->flags[WINED3D_GL_RES_TYPE_TEX_CUBE] |= format_texture_info[i].flags;
format->flags[WINED3D_GL_RES_TYPE_TEX_RECT] |= format_texture_info[i].flags; format->flags[WINED3D_GL_RES_TYPE_TEX_RECT] |= format_texture_info[i].flags;
format->flags[WINED3D_GL_RES_TYPE_BUFFER] |= format_texture_info[i].flags; format->flags[WINED3D_GL_RES_TYPE_BUFFER] |= format_texture_info[i].flags;