From 28b3563a95ab1d760e0998dd5de82e467ebf5f27 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 27 Aug 2021 10:32:41 +0200 Subject: [PATCH] Revert "zink: always init bordercolor value for sampler" This reverts commit 336dea90f09c5cefc46de5240da28950fdca0723. This change was incorrect for two reasons: 1. We already initialize this field on line 334 2. Unconditionally setting this to VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK breaks rendering with e.g opaque white borders, because we've already matched those to a non-custom enum value first. Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/zink_context.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 9a631788005..9f33d35a699 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -345,8 +345,7 @@ zink_create_sampler_state(struct pipe_context *pctx, assert(check <= screen->info.border_color_props.maxCustomBorderColorSamplers); } else sci.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK; // TODO with custom shader if we're super interested? - } else - sci.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK; + } sci.unnormalizedCoordinates = !state->normalized_coords;