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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user