Henri Verbeet : wined3d: Use wined3d_mask_from_size() in state_stencil().

Alexandre Julliard julliard at winehq.org
Mon Jul 5 16:24:20 CDT 2021


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jul  5 17:02:35 2021 +0200

wined3d: Use wined3d_mask_from_size() in state_stencil().

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

---

 dlls/wined3d/state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 264a9974b40..a9183278d86 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1072,7 +1072,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
     if (!(func_back = wined3d_gl_compare_func(d->desc.back.func)))
         func_back = GL_ALWAYS;
     mask = d->desc.stencil_read_mask;
-    ref = state->stencil_ref & ((1 << state->fb.depth_stencil->format->stencil_size) - 1);
+    ref = state->stencil_ref & wined3d_mask_from_size(state->fb.depth_stencil->format->stencil_size);
     stencilFail = gl_stencil_op(d->desc.front.fail_op);
     depthFail = gl_stencil_op(d->desc.front.depth_fail_op);
     stencilPass = gl_stencil_op(d->desc.front.pass_op);




More information about the wine-cvs mailing list