Henri Verbeet : wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in query_internal_format().

Alexandre Julliard julliard at winehq.org
Thu Jun 4 16:08:01 CDT 2020


Module: wine
Branch: master
Commit: 6fd061ba1958f828b792ae5ee216e599f531ed45
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6fd061ba1958f828b792ae5ee216e599f531ed45

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Jun  4 15:50:01 2020 +0430

wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in query_internal_format().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index df948264f9..26dd9ef533 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3100,8 +3100,7 @@ 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]
-                && texture_info->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
+        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;




More information about the wine-cvs mailing list