[PATCH 2/5] wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in the FBO cache.

Henri Verbeet hverbeet at codeweavers.com
Thu Jun 4 06:01:59 CDT 2020


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 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;
     }
 }
-- 
2.20.1




More information about the wine-devel mailing list