diff --git a/src/gallium/state_trackers/clover/api/memory.cpp b/src/gallium/state_trackers/clover/api/memory.cpp index 9b3cd8b..add03d8 100644 --- a/src/gallium/state_trackers/clover/api/memory.cpp +++ b/src/gallium/state_trackers/clover/api/memory.cpp @@ -75,6 +75,10 @@ clCreateBuffer(cl_context d_ctx, cl_mem_flags d_flags, size_t size, const cl_mem_flags flags = validate_flags(NULL, d_flags); auto &ctx = obj(d_ctx); + if (flags & CL_MEM_USE_HOST_PTR){ + throw error(CL_INVALID_HOST_PTR); + } + if (bool(host_ptr) != bool(flags & (CL_MEM_USE_HOST_PTR | CL_MEM_COPY_HOST_PTR))) throw error(CL_INVALID_HOST_PTR);