Matteo Bruni : wined3d: Assert that the CS queue size is a power of two.
Alexandre Julliard
julliard at winehq.org
Tue May 24 15:55:00 CDT 2022
Module: wine
Branch: master
Commit: 192695d1db4ceefff8c91e2743f9bb36353e940e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=192695d1db4ceefff8c91e2743f9bb36353e940e
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Wed Apr 6 13:00:58 2022 +0200
wined3d: Assert that the CS queue size is a power of two.
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
dlls/wined3d/wined3d_private.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 00d2cfea8e4..4d208260fbf 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -4976,6 +4976,8 @@ enum wined3d_push_constants
#define WINED3D_CS_SPIN_COUNT 10000000u
#define WINED3D_CS_QUEUE_MASK (WINED3D_CS_QUEUE_SIZE - 1)
+C_ASSERT(!(WINED3D_CS_QUEUE_SIZE & (WINED3D_CS_QUEUE_SIZE - 1)));
+
struct wined3d_cs_queue
{
ULONG head, tail;
More information about the wine-cvs
mailing list