1 Star 0 Fork 24

renping000/mesa

forked from src-anolis-os/mesa 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-iris-implement-inter-context-busy-tracking.patch 2.60 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 14:11 . update to mesa-21.3.4-1.el8.src.rpm
From 07dc3d4238e57901ccf98e0b506d9aad2c86b9d9 Mon Sep 17 00:00:00 2001
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date: Mon, 10 Jan 2022 17:18:05 -0800
Subject: [PATCH] iris: implement inter-context busy-tracking
Previously, no buffers were ever marked as EXEC_OBJECT_ASYNC so the
Kernel would ensure dependency tracking for us. After we implemented
explicit busy tracking in commit 89a34cb8450a, only the external
objects kept relying on the Kernel's implicit tracking and Iris did
inter-batch busy tracking, meaning we lost inter-screen and
inter-context synchronization. This seemed fine to me since, as far as
I understood, it is the duty of the application to synchronize itself
against multiple screens and contexts.
The problem here is that applications were actually relying on the old
behavior where the Kernel guarantees synchronization, so 89a34cb8450a
can be seen as a regression. This commit addresses the inter-context
synchronization case.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5731
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5812
Fixes: 89a34cb8450a ("iris: switch to explicit busy tracking")
Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
src/gallium/drivers/iris/iris_batch.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c
index b7bde60aae7..1b0c5896d4f 100644
--- a/src/gallium/drivers/iris/iris_batch.c
+++ b/src/gallium/drivers/iris/iris_batch.c
@@ -835,6 +835,12 @@ update_bo_syncobjs(struct iris_batch *batch, struct iris_bo *bo, bool write)
move_syncobj_to_batch(batch, &deps->write_syncobjs[other_batch_idx],
I915_EXEC_FENCE_WAIT);
+ /* If it's being written by our screen, wait on it too. This is relevant
+ * when there are multiple contexts on the same screen. */
+ if (deps->write_syncobjs[batch_idx])
+ move_syncobj_to_batch(batch, &deps->write_syncobjs[batch_idx],
+ I915_EXEC_FENCE_WAIT);
+
struct iris_syncobj *batch_syncobj = iris_batch_get_signal_syncobj(batch);
if (write) {
@@ -847,6 +853,8 @@ update_bo_syncobjs(struct iris_batch *batch, struct iris_bo *bo, bool write)
move_syncobj_to_batch(batch, &deps->read_syncobjs[other_batch_idx],
I915_EXEC_FENCE_WAIT);
+ move_syncobj_to_batch(batch, &deps->read_syncobjs[batch_idx],
+ I915_EXEC_FENCE_WAIT);
} else {
/* If we're reading, replace the other read from our batch index. */
--
GitLab
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/renping000/mesa.git
git@gitee.com:renping000/mesa.git
renping000
mesa
mesa
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385