[Mesa-dev] [PATCH 3/3] clover: Append buffers that use CL_MEM_USE_HOST_PTR
Francisco Jerez
currojerez at riseup.net
Sun Dec 15 23:56:05 PST 2013
Jan Vesely <jan.vesely at rutgers.edu> writes:
> Specs say it's legal for implementations to use internal copies,
> and the write synchronization seems to work.
> Fixes clCreateBuffer (together with previous patches)
> and buffer-flags piglits.
>
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> src/gallium/state_trackers/clover/core/memory.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/core/memory.cpp b/src/gallium/state_trackers/clover/core/memory.cpp
> index 87a9f7a..1db3f68 100644
> --- a/src/gallium/state_trackers/clover/core/memory.cpp
> +++ b/src/gallium/state_trackers/clover/core/memory.cpp
> @@ -31,7 +31,7 @@ memory_obj::memory_obj(context &ctx, cl_mem_flags flags,
> ctx(ctx), _flags(flags),
> _size(size), _host_ptr(host_ptr),
> _destroy_notify([]{}) {
> - if (flags & CL_MEM_COPY_HOST_PTR)
> + if (flags & (CL_MEM_COPY_HOST_PTR | CL_MEM_USE_HOST_PTR))
> data.append((char *)host_ptr, size);
> }
>
There are a couple of places more left to fix for our host_ptr handling
to be fully compliant with the spec, but, as this makes piglit happy:
Acked-by: Francisco Jerez <currojerez at riseup.net>
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131216/4f01d476/attachment.pgp>
More information about the mesa-dev
mailing list