From 975501642269efa0c3a2a401f9821cd7ced29547 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 22 May 2023 19:33:08 +0200 Subject: render/vulkan: use VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE for default sampler We don't actually need the REPEAT mode, and this makes things more consistent with the YCbCr sampler (which requires CLAMP_TO_EDGE for spec compliance). Also drop borderColor which is unused for this mode. --- render/vulkan/renderer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'render') diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c index 8c35a1c5..805a253e 100644 --- a/render/vulkan/renderer.c +++ b/render/vulkan/renderer.c @@ -2405,13 +2405,11 @@ static bool init_static_render_data(struct wlr_vk_renderer *renderer) { .magFilter = VK_FILTER_LINEAR, .minFilter = VK_FILTER_LINEAR, .mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST, - .addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT, - .addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT, - .addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT, - .maxAnisotropy = 1.f, + .addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + .addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + .addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, .minLod = 0.f, .maxLod = 0.25f, - .borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, }; res = vkCreateSampler(dev, &sampler_info, NULL, &renderer->sampler); -- cgit v1.2.3