[PATCH 2/2] wined3d: Return TRUE for NULL SRV format from wined3d_dsv_srv_conflict().

Paul Gofman gofmanp at gmail.com
Fri Nov 1 03:02:43 CDT 2019


This undoes unintended change of wined3d_resource_check_fbo_attached()
behaviour for pre-10.0 APIs.

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
 dlls/wined3d/wined3d_private.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2974227d0c..cd831cdd42 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -5316,8 +5316,8 @@ static inline void wined3d_context_copy_bo_address(struct wined3d_context *conte
 static inline BOOL wined3d_dsv_srv_conflict(const struct wined3d_rendertarget_view *dsv,
         const struct wined3d_format *srv_format)
 {
-    return srv_format && ((srv_format->depth_size && !(dsv->desc.flags & WINED3D_VIEW_READ_ONLY_DEPTH))
-            || (srv_format->stencil_size && !(dsv->desc.flags & WINED3D_VIEW_READ_ONLY_STENCIL)));
+    return !srv_format || (srv_format->depth_size && !(dsv->desc.flags & WINED3D_VIEW_READ_ONLY_DEPTH))
+            || (srv_format->stencil_size && !(dsv->desc.flags & WINED3D_VIEW_READ_ONLY_STENCIL));
 }
 
 static inline BOOL wined3d_resource_check_fbo_attached(const struct wined3d_state *state,
-- 
2.23.0




More information about the wine-devel mailing list