From a8cb837703df6630eed17d49ef413e33e18ddbc4 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sun, 26 Mar 2023 00:42:10 +0100 Subject: [PATCH] radv: Align atomic values. Part-of: --- src/amd/vulkan/radv_query.c | 10 +++++----- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index 213f2a4..e084323 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -1224,7 +1224,7 @@ radv_GetQueryPoolResults(VkDevice _device, VkQueryPool queryPool, uint32_t first case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR: case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR: case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR: { - uint64_t const *src64 = (uint64_t const *)src; + p_atomic_uint64_t const *src64 = (p_atomic_uint64_t const *)src; uint64_t value; do { @@ -1248,7 +1248,7 @@ radv_GetQueryPoolResults(VkDevice _device, VkQueryPool queryPool, uint32_t first break; } case VK_QUERY_TYPE_OCCLUSION: { - uint64_t const *src64 = (uint64_t const *)src; + p_atomic_uint64_t const *src64 = (p_atomic_uint64_t const *)src; uint32_t db_count = device->physical_device->rad_info.max_render_backends; uint64_t enabled_rb_mask = device->physical_device->rad_info.enabled_rb_mask; uint64_t sample_count = 0; @@ -1349,7 +1349,7 @@ radv_GetQueryPoolResults(VkDevice _device, VkQueryPool queryPool, uint32_t first break; } case VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT: { - uint64_t const *src64 = (uint64_t const *)src; + p_atomic_uint64_t const *src64 = (p_atomic_uint64_t const *)src; uint64_t num_primitives_written; uint64_t primitive_storage_needed; @@ -1389,7 +1389,7 @@ radv_GetQueryPoolResults(VkDevice _device, VkQueryPool queryPool, uint32_t first break; } case VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT: { - uint64_t const *src64 = (uint64_t const *)src; + p_atomic_uint64_t const *src64 = (p_atomic_uint64_t const *)src; uint64_t primitive_storage_needed; /* SAMPLE_STREAMOUTSTATS stores this structure: @@ -1429,7 +1429,7 @@ radv_GetQueryPoolResults(VkDevice _device, VkQueryPool queryPool, uint32_t first } case VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR: { struct radv_pc_query_pool *pc_pool = (struct radv_pc_query_pool *)pool; - const uint64_t *src64 = (const uint64_t *)src; + const p_atomic_uint64_t *src64 = (const p_atomic_uint64_t *)src; bool avail; do { avail = true; diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h index 657b055..5ebe341 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h @@ -52,9 +52,9 @@ struct radv_amdgpu_winsys { bool reserve_vmid; uint64_t perftest; - uint64_t allocated_vram; - uint64_t allocated_vram_vis; - uint64_t allocated_gtt; + p_atomic_uint64_t allocated_vram; + p_atomic_uint64_t allocated_vram_vis; + p_atomic_uint64_t allocated_gtt; /* Global BO list */ struct { -- 2.7.4