From 97412fca25a9d7848f072aa8a79d5099d1c200be Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Tue, 26 Nov 2024 10:50:10 +0800 Subject: [PATCH] zink: use lazy descriptors for IMG proprietary drivers When using Zink with VK_EXT_descriptor_buffer enabled on IMG proprietary drivers, the rendering behavior is incorrect and uniforms are not updated properly (the gears of es2gears_x11 become all red and overlaps). Use lazy descriptors for IMG proprietary driver unless explicitly overriden for testing purpose. Signed-off-by: Icenowy Zheng Part-of: --- src/gallium/drivers/zink/zink_screen.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 886873479e5..9d1a0c3f71a 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -3671,11 +3671,16 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev } } if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) { + switch(screen->info.driver_props.driverID) { /* descriptor buffer is not performant with virt yet */ - if (screen->info.driver_props.driverID == VK_DRIVER_ID_MESA_VENUS) + case VK_DRIVER_ID_MESA_VENUS: + /* db descriptor mode is known to be broken on IMG proprietary drivers */ + case VK_DRIVER_ID_IMAGINATION_PROPRIETARY: zink_descriptor_mode = ZINK_DESCRIPTOR_MODE_LAZY; - else + break; + default: zink_descriptor_mode = can_db ? ZINK_DESCRIPTOR_MODE_DB : ZINK_DESCRIPTOR_MODE_LAZY; + } } if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) { const uint32_t sampler_size = MAX2(screen->info.db_props.combinedImageSamplerDescriptorSize, screen->info.db_props.robustUniformTexelBufferDescriptorSize);