From e0d30b2e8a50adefcfa299b6cce8ec44056c2638 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 10 Jun 2020 14:54:41 -0700 Subject: Fixed few alignment-related issues (API Version 240063) --- Graphics/GraphicsEngine/interface/APIInfo.h | 2 +- Graphics/GraphicsEngine/interface/GraphicsTypes.h | 3 +++ Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Graphics') diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h index c86914dc..18833f81 100644 --- a/Graphics/GraphicsEngine/interface/APIInfo.h +++ b/Graphics/GraphicsEngine/interface/APIInfo.h @@ -30,7 +30,7 @@ /// \file /// Diligent API information -#define DILIGENT_API_VERSION 240062 +#define DILIGENT_API_VERSION 240063 #include "../../../Primitives/interface/BasicTypes.h" diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index ece12fea..0d0631b7 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1866,6 +1866,9 @@ struct TextureFormatInfo DILIGENT_DERIVE(TextureFormatAttribs) /// Indicates if the format is supported by the device bool Supported DEFAULT_INITIALIZER(false); + + // Explicitly pad the structure to 8-byte boundary + bool Padding[7]; }; typedef struct TextureFormatInfo TextureFormatInfo; diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp index 74293d1b..523a5108 100644 --- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp @@ -61,7 +61,7 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, DEV_CHECK_ERR(CreationAttribs.ByteCode == nullptr, "'ByteCode' must be null when shader is created from source code or a file"); DEV_CHECK_ERR(CreationAttribs.ByteCodeSize == 0, "'ByteCodeSize' must be 0 when shader is created from source code or a file"); - static constexpr char* VulkanDefine = + static constexpr char VulkanDefine[] = "#ifndef VULKAN\n" "# define VULKAN 1\n" "#endif\n"; -- cgit v1.2.3