diff options
author | Nicolas Capens <capn@google.com> | 2018-10-29 20:53:14 -0400 |
---|---|---|
committer | Nicolas Capens <nicolascapens@google.com> | 2018-10-30 12:27:25 +0000 |
commit | 70942e2e8566bb870fb768c7862f9b2e208715da (patch) | |
tree | ef6a0139d889bf3a6dde18fdf2180fd8ae03c221 | |
parent | e83048e2bbfa055e2d8e109e23bebb3832ca13ff (diff) | |
download | swiftshader-70942e2e8566bb870fb768c7862f9b2e208715da.tar.gz |
Fix Vulkan build.
Initialization order mismatch is treated as an error with Clang/GCC:
-Werror=reorder
Bug b/118383648
Change-Id: I4e56aa3c61ce35d70a28dbdd1ab76d7ca8dae833
Reviewed-on: https://swiftshader-review.googlesource.com/c/22068
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
-rw-r--r-- | src/Vulkan/VkDeviceMemory.cpp | 7 | ||||
-rw-r--r-- | src/Vulkan/vulkan.vcxproj | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Vulkan/VkDeviceMemory.cpp b/src/Vulkan/VkDeviceMemory.cpp index 3dc42c4c6..921e72f62 100644 --- a/src/Vulkan/VkDeviceMemory.cpp +++ b/src/Vulkan/VkDeviceMemory.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "VkConfig.h" #include "VkDeviceMemory.hpp" +#include "VkConfig.h" + namespace vk { DeviceMemory::DeviceMemory(const VkMemoryAllocateInfo* pCreateInfo, void* mem) : - size(pCreateInfo->allocationSize), buffer(nullptr), memoryTypeIndex(pCreateInfo->memoryTypeIndex) + size(pCreateInfo->allocationSize), memoryTypeIndex(pCreateInfo->memoryTypeIndex) { ASSERT(size); } @@ -53,7 +54,7 @@ VkResult DeviceMemory::allocate() VkResult DeviceMemory::map(VkDeviceSize pOffset, VkDeviceSize pSize, void** ppData) { *ppData = getOffsetPointer(pOffset); - + return VK_SUCCESS; } diff --git a/src/Vulkan/vulkan.vcxproj b/src/Vulkan/vulkan.vcxproj index bf267c149..6ab656957 100644 --- a/src/Vulkan/vulkan.vcxproj +++ b/src/Vulkan/vulkan.vcxproj @@ -64,6 +64,7 @@ <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/permissive- %(AdditionalOptions)</AdditionalOptions>
+ <TreatSpecificWarningsAsErrors>4018;5038;4838</TreatSpecificWarningsAsErrors>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -85,6 +86,7 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;DEBUGGER_WAIT_DIALOG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/permissive- %(AdditionalOptions)</AdditionalOptions>
+ <TreatSpecificWarningsAsErrors>4018;5038;4838</TreatSpecificWarningsAsErrors>
</ClCompile>
<Link>
<ModuleDefinitionFile>swiftshader_icd.def</ModuleDefinitionFile>
|