From 46b4017b37e1a89d20670c9ea00eca0769701912 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 14 Jun 2022 09:55:25 -0400 Subject: zink: use VK_EXT_border_color_swizzle if borderColorSwizzleFromImage isn't supported, assume the border color must be pre-swizzled fixes #6651 Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_screen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 21a47629c67..84ba2add7ef 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -531,11 +531,13 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return 0; case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: - /* This is also broken on the other AMD drivers for old HW, but - * there's no obvious way to test for that. + /* assume that if drivers don't implement this extension they either: + * - don't support custom border colors + * - handle things correctly + * - hate border color accuracy */ - if (screen->info.driver_props.driverID == VK_DRIVER_ID_MESA_RADV || - screen->info.driver_props.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY) + if (screen->info.have_EXT_border_color_swizzle && + !screen->info.border_swizzle_feats.borderColorSwizzleFromImage) return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50; return 0; -- cgit v1.2.3