mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 23:00:11 +01:00
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:
parent
6842a8179f
commit
13e6d2ba00
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue