Mesa (main): Revert "zink: always init bordercolor value for sampler"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 27 18:20:17 UTC 2021


Module: Mesa
Branch: main
Commit: 28b3563a95ab1d760e0998dd5de82e467ebf5f27
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=28b3563a95ab1d760e0998dd5de82e467ebf5f27

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Aug 27 10:32:41 2021 +0200

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 <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12591>

---

 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;
 



More information about the mesa-commit mailing list