c/comp: Init repeat sampler for swapchain images.

This commit is contained in:
Lubosz Sarnecki 2020-10-23 10:05:17 +02:00 committed by Jakob Bornecrantz
parent 7035490ed7
commit 5777d829c6
2 changed files with 4 additions and 0 deletions

View file

@ -47,6 +47,7 @@ struct comp_swapchain_image
{
//! Sampler used by the renderer and distortion code.
VkSampler sampler;
VkSampler repeat_sampler;
//! Views used by the renderer and distortion code, for each array
//! layer.
struct

View file

@ -129,6 +129,9 @@ do_post_create_vulkan_setup(struct comp_compositor *c,
U_TYPED_ARRAY_CALLOC(VkImageView, info->array_size);
sc->images[i].array_size = info->array_size;
vk_create_sampler(&c->vk, VK_SAMPLER_ADDRESS_MODE_REPEAT,
&sc->images[i].repeat_sampler);
vk_create_sampler(&c->vk, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
&sc->images[i].sampler);