aboutsummaryrefslogtreecommitdiff
path: root/render/vulkan
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-05-22 19:33:08 +0200
committerSimon Ser <contact@emersion.fr>2023-05-24 08:58:59 +0000
commit975501642269efa0c3a2a401f9821cd7ced29547 (patch)
tree4ef16563888b4475e39dd0c519b0b5ae8b48fe4a /render/vulkan
parentfe7c9986662582edfe86bc11067253ea526adf38 (diff)
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.
Diffstat (limited to 'render/vulkan')
-rw-r--r--render/vulkan/renderer.c8
1 files changed, 3 insertions, 5 deletions
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);