diff --git a/src/gallium/drivers/zink/driinfo_zink.h b/src/gallium/drivers/zink/driinfo_zink.h
index e1cf6d7d559..9687285060c 100644
--- a/src/gallium/drivers/zink/driinfo_zink.h
+++ b/src/gallium/drivers/zink/driinfo_zink.h
@@ -3,6 +3,8 @@
DRI_CONF_SECTION_DEBUG
DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(false)
DRI_CONF_OPT_B(radeonsi_inline_uniforms, false, "Optimize shaders by replacing uniforms with literals")
+ DRI_CONF_OPT_B(disable_xcb_surface, false, \
+ "disable ext")
DRI_CONF_SECTION_END
DRI_CONF_SECTION_PERFORMANCE
diff --git a/src/gallium/drivers/zink/zink_instance.py b/src/gallium/drivers/zink/zink_instance.py
index 20002c4727b..632cf3c4bfc 100644
--- a/src/gallium/drivers/zink/zink_instance.py
+++ b/src/gallium/drivers/zink/zink_instance.py
@@ -43,7 +43,8 @@ EXTENSIONS = [
Extension("VK_KHR_surface"),
Extension("VK_EXT_headless_surface"),
Extension("VK_KHR_wayland_surface"),
- Extension("VK_KHR_xcb_surface"),
+ Extension("VK_KHR_xcb_surface",
+ conditions=["!instance_info->disable_xcb_surface"]),
]
# constructor: Layer(name, conditions=[])
@@ -73,10 +74,12 @@ header_code = """
#include "MoltenVK/vk_mvk_moltenvk.h"
#endif
+struct pipe_screen;
struct zink_screen;
struct zink_instance_info {
uint32_t loader_version;
+ bool disable_xcb_surface;
%for ext in extensions:
bool have_${ext.name_with_vendor()};
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index eb8df6b66a6..a5e2f1010d2 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -2113,6 +2113,7 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
NULL, NULL, NULL, 0, NULL, 0);
screen->driconf.dual_color_blend_by_location = driQueryOptionb(config->options, "dual_color_blend_by_location");
//screen->driconf.inline_uniforms = driQueryOptionb(config->options, "radeonsi_inline_uniforms");
+ screen->instance_info.disable_xcb_surface = driQueryOptionb(config->options, "disable_xcb_surface");
}
#endif
screen->instance = zink_create_instance(&screen->instance_info);
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index 1d44381b697..59de17e2110 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -70,6 +70,11 @@ TODO: document the other workarounds.
+
+
+
+
+