From 91762a62c6a3fbc8ab4692119bf431a9324b11d9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 30 Apr 2024 09:46:04 +0200 Subject: [PATCH] vkd3d-shader: Avoid non-constant initializer. Fixes "initializer element is not constant" error with gcc < 8. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56508 --- libs/vkd3d-shader/dxil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 6a1fb6bd..1bc389ca 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -31,7 +31,7 @@ static const uint64_t GLOBALVAR_FLAG_EXPLICIT_TYPE = 2; static const unsigned int GLOBALVAR_ADDRESS_SPACE_SHIFT = 2; static const uint64_t ALLOCA_FLAG_IN_ALLOCA = 0x20; static const uint64_t ALLOCA_FLAG_EXPLICIT_TYPE = 0x40; -static const uint64_t ALLOCA_ALIGNMENT_MASK = ALLOCA_FLAG_IN_ALLOCA - 1; +static const uint64_t ALLOCA_ALIGNMENT_MASK = 0x1f; static const unsigned int SHADER_DESCRIPTOR_TYPE_COUNT = 4; static const size_t MAX_IR_INSTRUCTIONS_PER_DXIL_INSTRUCTION = 11;