From 0b3bd1a7c2d721de00670a69c1b7847b6c2214e8 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 31 Oct 2019 16:10:23 +0100 Subject: [PATCH] radv: fix 32-bit compiler warnings Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2031 Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index 68d361f41dd..b8f74036fc6 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -248,7 +248,7 @@ radv_dump_descriptors(struct radv_device *device, FILE *f) fprintf(f, "Descriptors:\n"); for (i = 0; i < MAX_SETS; i++) { struct radv_descriptor_set *set = - (struct radv_descriptor_set *)ptr[i + 3]; + *(struct radv_descriptor_set **)(ptr + i + 3); radv_dump_descriptor_set(device, set, i, f); } @@ -497,7 +497,7 @@ radv_get_saved_graphics_pipeline(struct radv_device *device) { uint64_t *ptr = (uint64_t *)device->trace_id_ptr; - return (struct radv_pipeline *)ptr[1]; + return *(struct radv_pipeline **)(ptr + 1); } static struct radv_pipeline * @@ -505,7 +505,7 @@ radv_get_saved_compute_pipeline(struct radv_device *device) { uint64_t *ptr = (uint64_t *)device->trace_id_ptr; - return (struct radv_pipeline *)ptr[2]; + return *(struct radv_pipeline **)(ptr + 2); } static void -- 2.30.2