From 769e6f2bae18408c29207360d440ca3c8b863c3a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 21 Apr 2025 19:10:18 +1000 Subject: [PATCH] GPUThread: Fix command size blow-up --- src/core/gpu_thread_commands.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/gpu_thread_commands.h b/src/core/gpu_thread_commands.h index 44ad56eb7..dbfad3d95 100644 --- a/src/core/gpu_thread_commands.h +++ b/src/core/gpu_thread_commands.h @@ -54,16 +54,15 @@ enum class GPUBackendCommandType : u8 DrawPreciseLine, }; -struct alignas(16) GPUThreadCommand +struct GPUThreadCommand { u32 size; GPUBackendCommandType type; static constexpr u32 AlignCommandSize(u32 size) { - // Ensure size is a multiple of 8 (minimum data size) so we don't end up with an unaligned command. - // NOTE: If we ever end up putting vectors in the command packets, this should be raised. - constexpr u32 COMMAND_QUEUE_ALLOCATION_ALIGNMENT = alignof(GPUThreadCommand); + // Ensure size is a multiple of 16 (minimum data size) so we don't end up with an unaligned command. + constexpr u32 COMMAND_QUEUE_ALLOCATION_ALIGNMENT = 16; return Common::AlignUpPow2(size, COMMAND_QUEUE_ALLOCATION_ALIGNMENT); } };