Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device: Replace
query_count
parameter in get_query_pool_results
w…
…ith `data.len()` A slice is designed to be a cheap view into a continuous segment of memory and easily recreated with a different offset and size. This can be used to our advantage to let the user set exactly how many items they want to request, while ensuring all returned slots are filled on success or otherwise return `NOT_READY` if not enough query results could be copied to user memory (or block if the `WAIT` flag is set). This also opens the door to accepting `MaybeUninit` in the future and returning the initialized slice in the `VkResult::Ok(here)` case.
- Loading branch information