summaryrefslogtreecommitdiff
path: root/lib/igt_draw.c
diff options
context:
space:
mode:
authorZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2020-09-30 14:09:45 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2020-10-01 13:21:29 +0100
commit1a7ef7eb5e99c9a8f4ffbc13cdae399a01a9aa12 (patch)
tree6f6d16ad2ac076d3d98373adcc0a93c7daec21de /lib/igt_draw.c
parent19ae9421a5af7b03a1c9a577c57f2cf8b16a0116 (diff)
lib/intel_batchbuffer: Prepare batch to use in allocator infrastructure
With upcoming of allocator code we need to ensure batch will execute with appropriate context. If mismatch between allocator data and batch could lead to strange or wrong results. All functions which could change context in execbuf called from intel_bb were removed. As an allocator requires size (which was not previously required in intel_bb) adding object to intel_bb is now mandatory. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_draw.c')
-rw-r--r--lib/igt_draw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 7a30340f..353467a2 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -601,10 +601,9 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
src = create_buf(fd, cmd_data->bops, &tmp, I915_TILING_NONE);
dst = create_buf(fd, cmd_data->bops, buf, tiling);
- ibb = intel_bb_create(fd, PAGE_SIZE);
+ ibb = intel_bb_create_with_context(fd, cmd_data->ctx, PAGE_SIZE);
- rendercopy(ibb, cmd_data->ctx, src, 0, 0, rect->w,
- rect->h, dst, rect->x, rect->y);
+ rendercopy(ibb, src, 0, 0, rect->w, rect->h, dst, rect->x, rect->y);
intel_bb_destroy(ibb);
intel_buf_destroy(src);