From 8a00f2d901cc9604f655cfb10ff0ba703594f05f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 15 Jul 2025 00:04:43 +0800 Subject: [PATCH] GPU (Windows): fix compiling on x86-32 --- src/util/windows/nt.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/windows/nt.h b/src/util/windows/nt.h index f56876d34..a33870796 100644 --- a/src/util/windows/nt.h +++ b/src/util/windows/nt.h @@ -175,7 +175,13 @@ typedef struct _D3DKMT_QUERYSTATISTICS D3DKMT_QUERYSTATISTICS_QUERY_NODE2 QueryNode2; // in: id of node to get statistics for }; } D3DKMT_QUERYSTATISTICS; -static_assert(sizeof(D3DKMT_QUERYSTATISTICS) == 0x328, "D3DKMT_QUERYSTATISTICS structure size mismatch"); +static_assert(sizeof(D3DKMT_QUERYSTATISTICS) == + #if _WIN64 + 0x328 + #else + 0x320 + #endif +, "D3DKMT_QUERYSTATISTICS structure size mismatch"); EXTERN_C _Check_return_ NTSTATUS APIENTRY D3DKMTQueryStatistics(_In_ CONST D3DKMT_QUERYSTATISTICS*); #define DXGK_MAX_METADATA_NAME_LENGTH 32