radv: make sure to zero-initialize MSB of accel struct descriptor

RADV only uses the first 8 bytes but zero-initializing it make sure
the descriptor is invariant.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35763>
This commit is contained in:
Samuel Pitoiset 2025-06-26 10:52:46 +02:00 committed by Marge Bot
parent 6842a8179f
commit 13e6d2ba00

View file

@ -1150,7 +1150,10 @@ write_accel_struct(struct radv_device *device, void *ptr, VkDeviceAddress va)
va = vk_acceleration_structure_get_va(accel_struct);
}
memcpy(ptr, &va, sizeof(va));
uint64_t desc[2] = {va, 0};
assert(sizeof(desc) == RADV_ACCEL_STRUCT_DESC_SIZE);
memcpy(ptr, desc, RADV_ACCEL_STRUCT_DESC_SIZE);
}
static ALWAYS_INLINE void