Mesa (main): zink: use VK_EXT_non_seamless_cube_map when available

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 14 19:56:39 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Jun  9 08:29:43 2022 -0400

zink: use VK_EXT_non_seamless_cube_map when available

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16944>

---

 src/gallium/drivers/zink/zink_context.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 165e705e186..726dcbe4479 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -309,6 +309,8 @@ zink_create_sampler_state(struct pipe_context *pctx,
    VkSamplerCreateInfo sci = {0};
    VkSamplerCustomBorderColorCreateInfoEXT cbci = {0};
    sci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
+   if (screen->info.have_EXT_non_seamless_cube_map && !state->seamless_cube_map)
+      sci.flags |= VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT;
    sci.unnormalizedCoordinates = !state->normalized_coords;
    sci.magFilter = zink_filter(state->mag_img_filter);
    if (sci.unnormalizedCoordinates)
@@ -406,7 +408,8 @@ zink_create_sampler_state(struct pipe_context *pctx,
    util_dynarray_init(&sampler->desc_set_refs.refs, NULL);
    calc_descriptor_hash_sampler_state(sampler);
    sampler->custom_border_color = need_custom;
-   sampler->nonseamless = !state->seamless_cube_map;
+   if (!screen->info.have_EXT_non_seamless_cube_map)
+      sampler->nonseamless = !state->seamless_cube_map;
 
    return sampler;
 }



More information about the mesa-commit mailing list