[PATCH 09/10] wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in texture2d_blt().
Henri Verbeet
hverbeet at codeweavers.com
Wed Jun 3 06:10:11 CDT 2020
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/wined3d/surface.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0c95f7a43a5..652f6070b93 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1483,11 +1483,11 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
const struct wined3d_color_key *colour_key = NULL;
DWORD src_location, dst_location, valid_locations;
- DWORD src_ds_flags, dst_ds_flags;
struct wined3d_context *context;
enum wined3d_blit_op blit_op;
BOOL scale, convert, resolve;
RECT src_rect, dst_rect;
+ bool src_ds, dst_ds;
static const DWORD simple_blit = WINED3D_BLT_SRC_CKEY
| WINED3D_BLT_SRC_CKEY_OVERRIDE
@@ -1561,12 +1561,10 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
convert = src_texture->resource.format->id != dst_texture->resource.format->id;
resolve = src_texture->resource.multisample_type != dst_texture->resource.multisample_type;
- dst_ds_flags = dst_texture->resource.format_flags
- & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
- src_ds_flags = src_texture->resource.format_flags
- & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
+ dst_ds = dst_texture->resource.format->depth_size || dst_texture->resource.format->stencil_size;
+ src_ds = src_texture->resource.format->depth_size || src_texture->resource.format->stencil_size;
- if (src_ds_flags || dst_ds_flags)
+ if (src_ds || dst_ds)
{
TRACE("Depth/stencil blit.\n");
--
2.20.1
More information about the wine-devel
mailing list