[PATCH 4/5] wined3d: Assert that the CS queue size is a power of two.

Matteo Bruni wine at gitlab.winehq.org
Fri May 20 05:40:06 CDT 2022


From: Matteo Bruni <mbruni at codeweavers.com>

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 1d8bb40cec4..2ab8186f900 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;
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/101



More information about the wine-devel mailing list