Commit d030c5ad authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Don't allow 3D depth textures.

parent 87bf9c99
...@@ -1857,13 +1857,19 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win ...@@ -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_1D] |= format_texture_info[i].flags;
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]) 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; format->flags[WINED3D_GL_RES_TYPE_TEX_3D] |= format_texture_info[i].flags;
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP]) 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_CUBE] |= format_texture_info[i].flags;
if (gl_info->supported[ARB_TEXTURE_RECTANGLE]) 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_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]) if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2])
{ {
......
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