mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
zink: support PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_FREEDRENO
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17189>
This commit is contained in:
parent
2f46495ac0
commit
3f11ae93be
2 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue