Skip to content
Snippets Groups Projects
Commit 3e443350 authored by Niklas Haas's avatar Niklas Haas
Browse files

gpu: relax multiple-of-4 requirement on pl_buf_read

Turns out with the way this is implemented there is effectively no need
for the multiple-of-4 restriction, since the actual access to the buffer
is via the host. So drop that requirement.

Not bumping the API version because it's such a minor change in
functionality.
parent 7832801e
No related branches found
No related tags found
No related merge requests found
......@@ -799,7 +799,6 @@ bool pl_buf_read(const struct pl_gpu *gpu, const struct pl_buf *buf,
{
require(buf->params.host_readable);
require(buf_offset + size <= buf->params.size);
require(buf_offset == PL_ALIGN2(buf_offset, 4));
const struct pl_gpu_fns *impl = TA_PRIV(gpu);
return impl->buf_read(gpu, buf, buf_offset, dest, size);
......
......@@ -576,9 +576,8 @@ void pl_buf_destroy(const struct pl_gpu *gpu, const struct pl_buf **buf);
void pl_buf_write(const struct pl_gpu *gpu, const struct pl_buf *buf,
size_t buf_offset, const void *data, size_t size);
// Read back the contents of a buffer, starting at a given offset (must be a
// multiple of 4) and up to a given size, storing the data into *dest.
// Returns whether successful.
// Read back the contents of a buffer, starting at a given offset, storing the
// data into *dest. Returns whether successful.
//
// Note: This operation will never block, so reading from a buffer that is
// currently being written to results in the read memory regions containing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment