From: Bas Nieuwenhuizen Date: Mon, 30 Sep 2019 21:20:05 +0000 (+0200) Subject: radv: Fix warning in 32-bit build. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c837872fbada93deb42f499de4325e0c41c9e3a1;p=mesa.git radv: Fix warning in 32-bit build. uintptr_t is 32 bits in a 32-bits build, resulting in shifting out of bounds. Reviewed-by: Eric Engestrom Reviewed-by: Samuel Pitoiset --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index f93195be4c0..1e5e2834135 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -556,8 +556,9 @@ radv_save_pipeline(struct radv_cmd_buffer *cmd_buffer, assert(!"invalid ring type"); } - data[0] = (uintptr_t)pipeline; - data[1] = (uintptr_t)pipeline >> 32; + uint64_t pipeline_address = (uintptr_t)pipeline; + data[0] = pipeline_address; + data[1] = pipeline_address >> 32; radv_emit_write_data_packet(cmd_buffer, va, 2, data); }