aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <deowens@MSDN-ORL-DOWENS.amd.com>2016-01-21 11:21:53 -0500
committerMark Young <marky@lunarg.com>2016-01-26 09:30:32 -0700
commit4ee44fc18c0582edb7b193a9c08ab9a3222f9033 (patch)
treee81093243c42ba010a6adacf2018dcaad98c4201
parent53395a819a62e583209a680b1e07c78b0ff8e05d (diff)
downloadusermoji-4ee44fc18c0582edb7b193a9c08ab9a3222f9033.tar.xz
fixed custom allocator aligned memory allocations in tri sample.
fixed x86 compilation.
-rw-r--r--demos/tri.c11
-rw-r--r--demos/vulkaninfo.c2
2 files changed, 11 insertions, 2 deletions
diff --git a/demos/tri.c b/demos/tri.c
index 6b17eb34..e9285e5c 100644
--- a/demos/tri.c
+++ b/demos/tri.c
@@ -1730,14 +1730,23 @@ VKAPI_ATTR void* VKAPI_CALL myalloc(
size_t alignment,
VkSystemAllocationScope allocationScope)
{
- return malloc(size);
+#ifdef _MSC_VER
+ return _aligned_malloc(size, alignment);
+#else
+ return aligned_malloc(alignment, size);
+#endif
}
VKAPI_ATTR void VKAPI_CALL myfree(
void* pUserData,
void* pMemory)
{
+#ifdef _MSC_VER
+ _aligned_free(pMemory);
+#else
free(pMemory);
+#endif
}
+
static void demo_init_vk(struct demo *demo)
{
VkResult err;
diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c
index a8f3bd64..8b13ab4d 100644
--- a/demos/vulkaninfo.c
+++ b/demos/vulkaninfo.c
@@ -130,7 +130,7 @@ struct app_gpu {
};
static VKAPI_ATTR VkBool32 VKAPI_CALL dbg_callback(
- VkDebugReportFlagsEXT msgFlags,
+ VkFlags msgFlags,
VkDebugReportObjectTypeEXT objType,
uint64_t srcObject,
size_t location,