From 831701d3f4f14de1ae2e9713a8849f18103a9af0 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 4 Jun 2020 15:31:59 +0430 Subject: [PATCH] wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in the FBO cache. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/context_gl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 08a90e36634..b7ca8ceca2e 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -566,9 +566,9 @@ static struct fbo_entry *wined3d_context_gl_create_fbo_entry(const struct wined3 entry->flags = 0; if (depth_stencil->resource) { - if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_DEPTH) + if (depth_stencil->resource->format->depth_size) entry->flags |= WINED3D_FBO_ENTRY_FLAG_DEPTH; - if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_STENCIL) + if (depth_stencil->resource->format->stencil_size) entry->flags |= WINED3D_FBO_ENTRY_FLAG_STENCIL; } entry->rt_mask = context_generate_rt_mask(GL_COLOR_ATTACHMENT0); @@ -594,9 +594,9 @@ static void wined3d_context_gl_reuse_fbo_entry(struct wined3d_context_gl *contex entry->flags = 0; if (depth_stencil->resource) { - if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_DEPTH) + if (depth_stencil->resource->format->depth_size) entry->flags |= WINED3D_FBO_ENTRY_FLAG_DEPTH; - if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_STENCIL) + if (depth_stencil->resource->format->stencil_size) entry->flags |= WINED3D_FBO_ENTRY_FLAG_STENCIL; } }