mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
radv: Pointer arithmetic without void*
Fixes: 736834931b ("radv: memset the alignment hole in cache_entry to 0")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8871>
This commit is contained in:
parent
27d496706e
commit
fbaf136821
1 changed files with 3 additions and 3 deletions
|
|
@ -419,9 +419,9 @@ radv_pipeline_cache_insert_shaders(struct radv_device *device,
|
|||
}
|
||||
|
||||
// Make valgrind happy by filling the alignment hole at the end.
|
||||
assert((void*)p == (void*)entry + size_without_align);
|
||||
assert(sizeof(*entry) + ((void*)p - (void*)entry->code) == size_without_align);
|
||||
memset((void*)entry + size_without_align, 0, size - size_without_align);
|
||||
assert(p == (char*)entry + size_without_align);
|
||||
assert(sizeof(*entry) + (p - entry->code) == size_without_align);
|
||||
memset((char*)entry + size_without_align, 0, size - size_without_align);
|
||||
|
||||
/* Always add cache items to disk. This will allow collection of
|
||||
* compiled shaders by third parties such as steam, even if the app
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue