[PATCH 4/4] wined3d: Don't use depth textures without ARB_depth_texture.
Stefan Dösinger
stefan at codeweavers.com
Wed Apr 29 17:00:16 CDT 2015
This fixes bug 21708. There are still plenty of FBO bugs left in the
r200 driver though.
I assume the ARB_internalformat_query2 path does the right thing here,
but I cannot actually test it because the only GPU without
ARB_depth_texture that I have (r200) doesn't support
internalformat_query2.
---
dlls/wined3d/utils.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 34da55d..3fa4f86 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -1919,6 +1919,17 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
if ((format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write)
format_clear_flag(format, WINED3DFMT_FLAG_SRGB_WRITE);
+
+ if (!gl_info->supported[ARB_DEPTH_TEXTURE])
+ {
+ static const unsigned int depth_flags = WINED3DFMT_FLAG_SHADOW | WINED3DFMT_FLAG_DEPTH
+ | WINED3DFMT_FLAG_STENCIL;
+ format->flags[WINED3D_GL_RES_TYPE_TEX_1D] &= ~depth_flags;
+ format->flags[WINED3D_GL_RES_TYPE_TEX_2D] &= ~depth_flags;
+ format->flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~depth_flags;
+ format->flags[WINED3D_GL_RES_TYPE_TEX_CUBE] &= ~depth_flags;
+ format->flags[WINED3D_GL_RES_TYPE_TEX_RECT] &= ~depth_flags;
+ }
}
/* Texture conversion stuff */
--
2.3.6
More information about the wine-patches
mailing list