Mesa (main): broadcom: add no_merge_jobs debug option

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 20 12:34:52 UTC 2022


Module: Mesa
Branch: main
Commit: e4d7c3b17953ce7498a348c9a50a849cb6f6e38c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4d7c3b17953ce7498a348c9a50a849cb6f6e38c

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Tue Jul  5 13:04:59 2022 +0200

broadcom: add no_merge_jobs debug option

To avoid having a custom getenv on v3dv.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609>

---

 src/broadcom/common/v3d_debug.c   | 2 ++
 src/broadcom/common/v3d_debug.h   | 1 +
 src/broadcom/vulkan/v3dv_device.c | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/broadcom/common/v3d_debug.c b/src/broadcom/common/v3d_debug.c
index 4ee19314a96..547c55d5952 100644
--- a/src/broadcom/common/v3d_debug.c
+++ b/src/broadcom/common/v3d_debug.c
@@ -94,6 +94,8 @@ static const struct debug_named_value debug_control[] = {
         { "cache", V3D_DEBUG_CACHE,
           "Print on-disk cache events (only with cache enabled)" },
 #endif
+        { "no_merge_jobs", V3D_DEBUG_NO_MERGE_JOBS,
+          "Don't try to merge subpasses in the same job even if they share framebuffer configuration (v3dv only)" },
         { NULL }
 };
 
diff --git a/src/broadcom/common/v3d_debug.h b/src/broadcom/common/v3d_debug.h
index 3014176014b..c8822439845 100644
--- a/src/broadcom/common/v3d_debug.h
+++ b/src/broadcom/common/v3d_debug.h
@@ -65,6 +65,7 @@ extern uint32_t V3D_DEBUG;
 #define V3D_DEBUG_CL_NO_BIN         (1 << 21)
 #define V3D_DEBUG_DOUBLE_BUFFER     (1 << 22)
 #define V3D_DEBUG_CACHE             (1 << 23)
+#define V3D_DEBUG_NO_MERGE_JOBS     (1 << 24)
 
 #define V3D_DEBUG_SHADERS           (V3D_DEBUG_TGSI | V3D_DEBUG_NIR | \
                                      V3D_DEBUG_VIR | V3D_DEBUG_QPU | \
diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c
index 05eda8dcd57..21e264a8663 100644
--- a/src/broadcom/vulkan/v3dv_device.c
+++ b/src/broadcom/vulkan/v3dv_device.c
@@ -853,7 +853,7 @@ physical_device_init(struct v3dv_physical_device *device,
    /* Initialize sparse array for refcounting imported BOs */
    util_sparse_array_init(&device->bo_map, sizeof(struct v3dv_bo), 512);
 
-   device->options.merge_jobs = getenv("V3DV_NO_MERGE_JOBS") == NULL;
+   device->options.merge_jobs = !(V3D_DEBUG & V3D_DEBUG_NO_MERGE_JOBS);
 
    device->drm_syncobj_type = vk_drm_syncobj_get_type(device->render_fd);
 



More information about the mesa-commit mailing list