[PATCH v2 6/6] wined3d: Disable depth textures with backbuffer ORM.

Matteo Bruni mbruni at codeweavers.com
Tue Jul 14 07:10:37 CDT 2020


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>
---
v2: Do it in the proper place i.e. query_internal_format().

 dlls/wined3d/utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index eaa391fafbef..f0e202404bf3 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3035,7 +3035,8 @@ 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))
+        if ((!gl_info->supported[ARB_DEPTH_TEXTURE] || wined3d_settings.offscreen_rendering_mode != ORM_FBO)
+                && (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;
-- 
2.26.2




More information about the wine-devel mailing list