intel: protect against empty invalidate ranges
It's legal for an application to call vkInvalidateMappedMemoryRanges()
/ vkFlushMappedMemoryRanges() with zero sized ranges.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b91971c240
("anv: use the right helper to invalidate memory")
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6852
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17481>
This commit is contained in:
parent
105279e989
commit
1aeb11cde1
|
@ -49,6 +49,9 @@ intel_flush_range(void *start, size_t size)
|
|||
static inline void
|
||||
intel_invalidate_range(void *start, size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
intel_clflush_range(start, size);
|
||||
|
||||
/* Modern Atom CPUs (Baytrail+) have issues with clflush serialization,
|
||||
|
|
Loading…
Reference in New Issue