This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 73a353c826633d8414483aab374f5a2c4038b094
Author:     Philip Langdale <[email protected]>
AuthorDate: Wed Jul 15 06:51:26 2026 -0700
Commit:     Philip Langdale <[email protected]>
CommitDate: Sat Aug 29 17:07:53 2026 -0700

    avutil/vulkan: select nearest mipmap filtering for nearest samplers
    
    ff_vk_init_sampler() always used VK_SAMPLER_MIPMAP_MODE_LINEAR for samplers 
with
    normalized coordinates. But it is possible to have an image view that uses
    normalized coordinates while not supporting linear filtering (eg: 
R16G16_SINT).
    
    The simple solution is to always use nearest mipmap filtering if the image
    filter is nearest.
---
 libavutil/vulkan.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 4c3dbc9117..ec908940de 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -1631,8 +1631,9 @@ int ff_vk_init_sampler(FFVulkanContext *s, VkSampler 
*sampler,
         .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
         .magFilter = filt,
         .minFilter = sampler_info.magFilter,
-        .mipmapMode = unnorm_coords ? VK_SAMPLER_MIPMAP_MODE_NEAREST :
-                                      VK_SAMPLER_MIPMAP_MODE_LINEAR,
+        .mipmapMode = (unnorm_coords || filt == VK_FILTER_NEAREST) ?
+                      VK_SAMPLER_MIPMAP_MODE_NEAREST :
+                      VK_SAMPLER_MIPMAP_MODE_LINEAR,
         .addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
         .addressModeV = sampler_info.addressModeU,
         .addressModeW = sampler_info.addressModeU,

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to