Henri Verbeet : wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in the FBO cache.

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


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

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

wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in the FBO cache.

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

---

 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 08a90e3663..b7ca8ceca2 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;
     }
 }




More information about the wine-cvs mailing list