Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vulkan/gpu_buf: avoid segfault with unusually aligned size_base
This patch prevents a segmentation fault that occurs when size_base is not a multiple of max_transfer. If size_base is larger than the max_transfer value but is not a multiple of it, the last iteration of the loop will transfer too much. It needs to transfer how much is remaining of size_base. Note that the PL_MIN behaves identically when size_base is less than max_transfer, because xfer will never be nonzero in that scenario. Signed-off-by: Leo Izen <[email protected]>
- Loading branch information