History

libavutil/vulkan: Expose ff_vk_set_descriptor_image

Useful when creating a descriptor array of separate images

IndecisiveTurtle committed 1 year ago

Commit b37ce9b1 parent 9993a642 files · +14 −6Browse files

Unified · Split

2 files
  1. libavutil/vulkan.c +6 −6
  2. libavutil/vulkan.h +8 −0
libavutil/vulkan.c+6−6
@@ -2381,10 +2381,10 @@ static inline void update_set_pool_write(FFVulkanContext *s, FFVkExecContext *e, · 2380 unmodified lines
23812381 }
23822382 }
23832383
2384−static int vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
2385− FFVkExecContext *e, int set, int bind, int offs,
2386− VkImageView view, VkImageLayout layout,
2387− VkSampler sampler)
2384+int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
2385+ FFVkExecContext *e, int set, int bind, int offs,
2386+ VkImageView view, VkImageLayout layout,
2387+ VkSampler sampler)
23882388 {
23892389 FFVulkanDescriptorSet *desc_set = &shd->desc_set[set];
23902390
@@ -2521,8 +2521,8 @@ void ff_vk_shader_update_img_array(FFVulkanContext *s, FFVkExecContext *e, · 130 unmodified lines
25212521 const int nb_planes = av_pix_fmt_count_planes(hwfc->sw_format);
25222522
25232523 for (int i = 0; i < nb_planes; i++)
2524− vk_set_descriptor_image(s, shd, e, set, binding, i,
2525− views[i], layout, sampler);
2524+ ff_vk_set_descriptor_image(s, shd, e, set, binding, i,
2525+ views[i], layout, sampler);
25262526 }
25272527
25282528 void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e,
libavutil/vulkan.h+8−0
@@ -590,6 +590,14 @@ int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, FFVkExecContext *e, · 589 unmodified lines
590590 FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len,
591591 VkFormat fmt);
592592
593+/**
594+ * Sets an image descriptor for specified shader and binding.
595+ */
596+int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
597+ FFVkExecContext *e, int set, int bind, int offs,
598+ VkImageView view, VkImageLayout layout,
599+ VkSampler sampler);
600+
593601 /**
594602 * Update a descriptor in a buffer with an image array..
595603 * Must be called before binding the shader.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t