From b0b4028e0bf204bac192f8fcd01f8ef9f74aa9e5 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 2 Mar 2019 17:51:57 +0100 Subject: [PATCH] - align by 256 instead of 128 --- src/rendering/vulkan/shaders/vk_shader.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendering/vulkan/shaders/vk_shader.h b/src/rendering/vulkan/shaders/vk_shader.h index 8614fd3ae5..1a0c3438d8 100644 --- a/src/rendering/vulkan/shaders/vk_shader.h +++ b/src/rendering/vulkan/shaders/vk_shader.h @@ -9,7 +9,8 @@ class VulkanDevice; class VulkanShader; -template int UniformBufferAlignment() { return (sizeof(T) + 127) / 128 * 128; } +// To do: we need to read this from the card - or maybe merge ColorsUBO with GlowingWallsUBO since we have to use 256 bytes anyway +template int UniformBufferAlignment() { return (sizeof(T) + 255) / 256 * 256; } struct MatricesUBO {