From 38b989ec91490c783149cfffe56b17d683916454 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 18 Dec 2017 12:44:18 +0100 Subject: [PATCH] [dxvk] vkCmdUpdateBuffer can only be used if both offset and size are aligned to four bytes --- src/dxvk/dxvk_context.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index d3875feb7..0d4e6b838 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -470,10 +470,10 @@ namespace dxvk { this->renderPassEnd(); if (size != 0) { - // Vulkan specifies that small amounts of data (up to 64kB) - // can be copied to a buffer directly. Anything larger than - // that must be copied through a staging buffer. - if (size <= 65536) { + // Vulkan specifies that small amounts of data (up to 64kB) can + // be copied to a buffer directly if the size is a multiple of + // four. Anything else must be copied through a staging buffer. + if ((size <= 65536) && ((size & 0x3) == 0)) { m_cmd->cmdUpdateBuffer( buffer->handle(), offset, size, data);