Matteo Bruni : wined3d: Disable depth textures with backbuffer ORM.
Alexandre Julliard
julliard at winehq.org
Fri Jul 17 16:30:46 CDT 2020
Module: wine
Branch: master
Commit: 29dc8534f15d4265caf1beb1a270627a301cc5ce
URL: https://source.winehq.org/git/wine.git/?a=commit;h=29dc8534f15d4265caf1beb1a270627a301cc5ce
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Thu Jul 16 18:50:04 2020 +0200
wined3d: Disable depth textures with backbuffer ORM.
We currently don't have any way to copy the depth buffer from the
DRAWABLE to the TEXTURE location, aside from FBOs.
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/utils.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index eaa391fafb..8d790c5294 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3034,15 +3034,17 @@ static void query_internal_format(struct wined3d_adapter *adapter,
if ((format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write_supported)
format_clear_flag(&format->f, WINED3DFMT_FLAG_SRGB_WRITE);
+ }
- if (!gl_info->supported[ARB_DEPTH_TEXTURE] && (format->f.depth_size || format->f.stencil_size))
- {
- format->f.flags[WINED3D_GL_RES_TYPE_TEX_1D] &= ~WINED3DFMT_FLAG_TEXTURE;
- format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] &= ~WINED3DFMT_FLAG_TEXTURE;
- format->f.flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
- format->f.flags[WINED3D_GL_RES_TYPE_TEX_CUBE] &= ~WINED3DFMT_FLAG_TEXTURE;
- format->f.flags[WINED3D_GL_RES_TYPE_TEX_RECT] &= ~WINED3DFMT_FLAG_TEXTURE;
- }
+ if ((!gl_info->supported[ARB_DEPTH_TEXTURE] || wined3d_settings.offscreen_rendering_mode != ORM_FBO)
+ && (format->f.depth_size || format->f.stencil_size))
+ {
+ TRACE("Disabling texturing support for depth / stencil format %s.\n", debug_d3dformat(format->f.id));
+ format->f.flags[WINED3D_GL_RES_TYPE_TEX_1D] &= ~WINED3DFMT_FLAG_TEXTURE;
+ format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] &= ~WINED3DFMT_FLAG_TEXTURE;
+ format->f.flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
+ format->f.flags[WINED3D_GL_RES_TYPE_TEX_CUBE] &= ~WINED3DFMT_FLAG_TEXTURE;
+ format->f.flags[WINED3D_GL_RES_TYPE_TEX_RECT] &= ~WINED3DFMT_FLAG_TEXTURE;
}
query_view_class(format);
More information about the wine-cvs
mailing list