summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_cmd_buffer.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-09-30 23:20:05 +0200
committerBas Nieuwenhuizen <[email protected]>2019-10-03 13:06:08 +0000
commitc837872fbada93deb42f499de4325e0c41c9e3a1 (patch)
treefc4c82237c7f83e6ca0358f69e49844980a337b3 /src/amd/vulkan/radv_cmd_buffer.c
parent8ad3d8b178c0d8939db62ac2be9fdc98d127742d (diff)
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 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_cmd_buffer.c')
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c5
1 files changed, 3 insertions, 2 deletions
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);
}