From e3c2432b375237bc0a2d3c75d5c8ae0b18fb3903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= Date: Thu, 9 Aug 2018 14:53:53 -0400 Subject: [PATCH] gallium: add support for SVM (Share Virtual Memory) migrate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2 (Karol): Fix declaration of pointers argument v3 (Karol): Move flags into function interface as bools Signed-off-by: Jérôme Glisse Signed-off-by: Karol Herbst Acked-by: Francisco Jerez Part-of: --- src/gallium/include/pipe/p_context.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index b8c25a84e8f..f0c94ed4c7f 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -907,6 +907,22 @@ struct pipe_context { const struct pipe_grid_info *info); /*@}*/ + /** + * SVM (Share Virtual Memory) helpers + */ + /*@{*/ + /** + * Migrate range of virtual address to device or host memory. + * + * \param to_device - true if the virtual memory is migrated to the device + * false if the virtual memory is migrated to the host + * \param migrate_content - whether the content should be migrated as well + */ + void (*svm_migrate)(struct pipe_context *context, unsigned num_ptrs, + const void* const* ptrs, const size_t *sizes, + bool to_device, bool migrate_content); + /*@}*/ + /** * Get the default sample position for an individual sample point. *