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
2381 }2381 }
2382}2382}
2383 2383
2384static int vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,2384int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
2385 FFVkExecContext *e, int set, int bind, int offs,2385 FFVkExecContext *e, int set, int bind, int offs,
2386 VkImageView view, VkImageLayout layout,2386 VkImageView view, VkImageLayout layout,
2387 VkSampler sampler)2387 VkSampler sampler)
2388{2388{
2389 FFVulkanDescriptorSet *desc_set = &shd->desc_set[set];2389 FFVulkanDescriptorSet *desc_set = &shd->desc_set[set];
2390 2390
@@ -2521,8 +2521,8 @@ void ff_vk_shader_update_img_array(FFVulkanContext *s, FFVkExecContext *e, · 130 unmodified lines
2521 const int nb_planes = av_pix_fmt_count_planes(hwfc->sw_format);2521 const int nb_planes = av_pix_fmt_count_planes(hwfc->sw_format);
2522 2522
2523 for (int i = 0; i < nb_planes; i++)2523 for (int i = 0; i < nb_planes; i++)
2524 vk_set_descriptor_image(s, shd, e, set, binding, i,2524 ff_vk_set_descriptor_image(s, shd, e, set, binding, i,
2525 views[i], layout, sampler);2525 views[i], layout, sampler);
2526}2526}
2527 2527
2528void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e,2528void 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
590 FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len,590 FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len,
591 VkFormat fmt);591 VkFormat fmt);
592 592
593/**
594 * Sets an image descriptor for specified shader and binding.
595 */
596int 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
593/**601/**
594 * Update a descriptor in a buffer with an image array..602 * Update a descriptor in a buffer with an image array..
595 * Must be called before binding the shader.603 * 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