wined3d: Don't allow 3D depth textures.

This commit is contained in:
Stefan Dösinger 2015-05-16 15:29:13 +02:00 committed by Alexandre Julliard
parent 87bf9c99b8
commit d030c5ad06
1 changed files with 8 additions and 2 deletions

View File

@ -1857,13 +1857,19 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
format->flags[WINED3D_GL_RES_TYPE_TEX_1D] |= format_texture_info[i].flags;
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_BUFFER] |= format_texture_info[i].flags;
/* GL_ARB_depth_texture does not support 3D textures. It also says "cube textures are
* problematic", but doesn't explicitly mandate that an error is generated. */
if (gl_info->supported[EXT_TEXTURE3D]
&& !(format_texture_info[i].flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)))
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;
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
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;
if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2])
{