diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 30901314999..94ed858123a 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -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]) {