[Beignet] [PATCH] save host_ptr when create sub buffer from CL_MEM_ALLOC_HOST_PTR
Pan, Xiuli
xiuli.pan at intel.com
Thu Dec 1 07:14:18 UTC 2016
LGMT, the test code works fine.
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Guo, Yejun
Sent: Thursday, December 1, 2016 1:42 PM
To: beignet at lists.freedesktop.org
Cc: Guo, Yejun <yejun.guo at intel.com>
Subject: [Beignet] [PATCH] save host_ptr when create sub buffer from CL_MEM_ALLOC_HOST_PTR
it fixes issue at https://bugs.freedesktop.org/show_bug.cgi?id=98490
Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
---
src/cl_mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cl_mem.c b/src/cl_mem.c
index 798daaf..afce315 100644
--- a/src/cl_mem.c
+++ b/src/cl_mem.c
@@ -636,7 +636,7 @@ cl_mem_new_sub_buffer(cl_mem buffer,
mem->bo = buffer->bo;
mem->size = info->size;
sub_buf->sub_offset = info->origin;
- if (buffer->flags & CL_MEM_USE_HOST_PTR || buffer->flags & CL_MEM_COPY_HOST_PTR) {
+ if (buffer->flags & CL_MEM_USE_HOST_PTR || buffer->flags & CL_MEM_COPY_HOST_PTR || buffer->flags & CL_MEM_ALLOC_HOST_PTR) {
mem->host_ptr = buffer->host_ptr;
}
--
1.9.1
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list