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.
master
Simon Ser 2 years ago
parent fe7c998666
commit 9755016422

@ -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);

Loading…
Cancel
Save