[Mesa-dev] [PATCH 1/3] anv: Assert that the kernel leaves pinned BO addresses alone
Jason Ekstrand
jason at jlekstrand.net
Fri Jun 1 23:12:24 UTC 2018
---
src/intel/vulkan/anv_queue.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index 80dddeb..a0cbc34 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -49,8 +49,11 @@ anv_device_execbuf(struct anv_device *device,
struct drm_i915_gem_exec_object2 *objects =
(void *)(uintptr_t)execbuf->buffers_ptr;
- for (uint32_t k = 0; k < execbuf->buffer_count; k++)
+ for (uint32_t k = 0; k < execbuf->buffer_count; k++) {
+ if (execbuf_bos[k]->flags & EXEC_OBJECT_PINNED)
+ assert(execbuf_bos[k]->offset == objects[k].offset);
execbuf_bos[k]->offset = objects[k].offset;
+ }
return VK_SUCCESS;
}
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list