Commit 70942e2e by Nicolas Capens Committed by Nicolas Capens

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/22068Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent e83048e2
......@@ -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;
}
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment