diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 55525229d71..12190f439d8 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -379,7 +379,7 @@ zink_create_sampler_state(struct pipe_context *pctx, warn_missing_feature(warned, "customBorderColorWithoutFormat"); } if (screen->info.have_EXT_custom_border_color && - screen->info.border_color_feats.customBorderColorWithoutFormat) { + (screen->info.border_color_feats.customBorderColorWithoutFormat || state->border_color_format)) { if (!screen->info.have_EXT_border_color_swizzle) { static bool warned = false; warn_missing_feature(warned, "VK_EXT_border_color_swizzle"); @@ -401,7 +401,7 @@ zink_create_sampler_state(struct pipe_context *pctx, } } cbci.sType = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT; - cbci.format = VK_FORMAT_UNDEFINED; + cbci.format = screen->info.border_color_feats.customBorderColorWithoutFormat ? VK_FORMAT_UNDEFINED : zink_get_format(screen, state->border_color_format); /* these are identical unions */ memcpy(&cbci.customBorderColor, &state->border_color, sizeof(union pipe_color_union)); cbci.pNext = sci.pNext; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 612a4cca80c..b37ec894638 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -532,6 +532,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return 0; case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: + if (!screen->info.border_color_feats.customBorderColorWithoutFormat) + return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_FREEDRENO; /* assume that if drivers don't implement this extension they either: * - don't support custom border colors * - handle things correctly