diff options
author | Kenneth Graunke <[email protected]> | 2019-02-21 19:07:29 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-22 08:56:54 -0800 |
commit | 3090c6b9e9c114b3438be83399c7bed12f920505 (patch) | |
tree | b3d15bce923bd651c886b40d4f8da120123b235b /src | |
parent | 4f917e6a61860b58a05d40584f7aa3d5e4e32b75 (diff) |
vulkan: Fix 32-bit build for the new overlay layer
vulkan_core.h defines non-dispatchable handles as (struct object *)
on 64-bit systems, but uint64_t on 32-bit systems. The former can be
implicitly cast to void *, but the latter requires an explicit cast.
While here, %lu is the wrong format specifier for uint64_t on 32-bit
systems, so use PRIu64, fixing a warning.
Reported-by: Mike Lothian <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/overlay-layer/overlay.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vulkan/overlay-layer/overlay.cpp b/src/vulkan/overlay-layer/overlay.cpp index f3678198b00..04ee2833730 100644 --- a/src/vulkan/overlay-layer/overlay.cpp +++ b/src/vulkan/overlay-layer/overlay.cpp @@ -382,13 +382,13 @@ static struct swapchain_data *new_swapchain_data(VkSwapchainKHR swapchain, data->device = device_data; data->swapchain = swapchain; data->window_size = ImVec2(300, 300); - map_object(data->swapchain, data); + map_object((void *) data->swapchain, data); return data; } static void destroy_swapchain_data(struct swapchain_data *data) { - unmap_object(data->swapchain); + unmap_object((void *) data->swapchain); ralloc_free(data); } @@ -490,7 +490,7 @@ static void compute_swapchain_display(struct swapchain_data *data) const char *format_name = vk_Format_to_str(data->format); format_name = format_name ? (format_name + strlen("VK_FORMAT_")) : "unknown"; ImGui::Text("Swapchain format: %s", format_name); - ImGui::Text("Frames: %lu", data->n_frames); + ImGui::Text("Frames: %" PRIu64, data->n_frames); { double min_time = FLT_MAX, max_time = 0.0f; |