radv/winsys: Remove extra sizeof multiply.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 23 May 2020 00:01:44 +0000 (02:01 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 25 May 2020 11:12:07 +0000 (11:12 +0000)
The pointer is already uint64_t*, so the sizeof was too much ...

Fixes: eeff7e11544 "radv: Add userspace fence buffer per context."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>

src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c

index 00927413ee2b9026a7214adf9f952a6175a40e2e..5209addacfa39bcf3d644dd714c90ad98ed5e5a5 100644 (file)
@@ -164,7 +164,7 @@ static void radv_amdgpu_request_to_fence(struct radv_amdgpu_ctx *ctx,
        fence->fence.ip_instance = req->ip_instance;
        fence->fence.ring = req->ring;
        fence->fence.fence = req->seq_no;
-       fence->user_ptr = (volatile uint64_t*)(ctx->fence_map + (req->ip_type * MAX_RINGS_PER_TYPE + req->ring) * sizeof(uint64_t));
+       fence->user_ptr = (volatile uint64_t*)(ctx->fence_map + req->ip_type * MAX_RINGS_PER_TYPE + req->ring);
 }
 
 static struct radeon_winsys_fence *radv_amdgpu_create_fence()