diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2022-06-14 09:55:25 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-17 01:32:25 +0000 |
commit | 46b4017b37e1a89d20670c9ea00eca0769701912 (patch) | |
tree | 87a210c4176e8f824ad6e5d09074fe65da4b3867 | |
parent | 1effd3be67945713485c615408b7601f0642498e (diff) |
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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17029>
-rw-r--r-- | src/gallium/drivers/zink/zink_screen.c | 10 |
1 files 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; |