From 9af34f9aea2e4f0d6064450b64fb162affca5561 Mon Sep 17 00:00:00 2001
From: Henri Verbeet <hverbeet@codeweavers.com>
Date: Wed, 3 Jun 2020 15:40:07 +0430
Subject: [PATCH] wined3d: Use "depth_size"/"stencil_size" to check for
 depth/stencil formats in arbfp_blit_supported().

The idea is to get rid of the WINED3DFMT_FLAG_DEPTH and
WINED3DFMT_FLAG_STENCIL format flags, and instead introduce a flag similar to
WINED3DFMT_FLAG_RENDERTARGET that indicates whether the format can be used
with WINED3D_BIND_DEPTH_STENCIL.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 dlls/wined3d/arb_program_shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index e6daa88afd5..4724e5c959c 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7722,7 +7722,7 @@ static BOOL arbfp_blit_supported(enum wined3d_blit_op blit_op, const struct wine
 
     if (blit_op == WINED3D_BLIT_OP_RAW_BLIT && dst_format->id == src_format->id)
     {
-        if (dst_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
+        if (dst_format->depth_size || dst_format->stencil_size)
             blit_op = WINED3D_BLIT_OP_DEPTH_BLIT;
         else
             blit_op = WINED3D_BLIT_OP_COLOR_BLIT;
-- 
GitLab