demos: use PRINTF_SIZE_T_SPECIFIER in vulkaninfo
authorMike Stroyan <mike@LunarG.com>
Wed, 27 May 2015 19:09:15 +0000 (13:09 -0600)
committerMike Stroyan <mike@LunarG.com>
Tue, 16 Jun 2015 21:55:04 +0000 (15:55 -0600)
demos/vulkaninfo.c

index 69a85f9daf41723fe6ad156a67cf0a8e56c87e78..efee55fbcb35349f52446bd8dc52ad4358ffaada 100644 (file)
@@ -594,6 +594,12 @@ static void app_gpu_multi_compat(struct app_gpu *gpus, uint32_t gpu_count)
         }
 }
 
+#ifdef _WIN32
+#define PRINTF_SIZE_T_SPECIFIER    "%Iu"
+#else
+#define PRINTF_SIZE_T_SPECIFIER    "%zu"
+#endif
+
 static void app_gpu_dump_props(const struct app_gpu *gpu)
 {
     const VkPhysicalDeviceProperties *props = &gpu->props;
@@ -605,7 +611,7 @@ static void app_gpu_dump_props(const struct app_gpu *gpu)
     printf("\tdeviceId = 0x%04x\n",                 props->deviceId);
     printf("\tdeviceType = %s\n",                   vk_physical_device_type_string(props->deviceType));
     printf("\tdeviceName = %s\n",                   props->deviceName);
-    printf("\tmaxInlineMemoryUpdateSize = %zu\n",   props->maxInlineMemoryUpdateSize);
+    printf("\tmaxInlineMemoryUpdateSize = " PRINTF_SIZE_T_SPECIFIER "\n",   props->maxInlineMemoryUpdateSize);
     printf("\tmaxBoundDescriptorSets = %u\n",       props->maxBoundDescriptorSets);
     printf("\tmaxThreadGroupSize = %u\n",           props->maxThreadGroupSize);
     printf("\ttimestampFrequency = %lu\n",          props->timestampFrequency);