wined3d: Move the ARB_texture_cube_map check to init_format_texture_info.
This commit is contained in:
parent
7109bebd02
commit
0d6d64b358
|
@ -4430,12 +4430,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
|
|||
switch (resource_type)
|
||||
{
|
||||
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;
|
||||
allowed_usage = WINED3DUSAGE_AUTOGENMIPMAP
|
||||
| WINED3DUSAGE_DYNAMIC
|
||||
|
|
|
@ -979,12 +979,6 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
|||
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 */
|
||||
if (desc->usage & WINED3DUSAGE_AUTOGENMIPMAP)
|
||||
{
|
||||
|
|
|
@ -1859,6 +1859,7 @@ 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;
|
||||
if (gl_info->supported[EXT_TEXTURE3D])
|
||||
format->flags[WINED3D_GL_RES_TYPE_TEX_3D] |= 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_BUFFER] |= format_texture_info[i].flags;
|
||||
|
|
Loading…
Reference in New Issue