Useful when creating a descriptor array of separate images
Unified · Split
| @@ -2381,10 +2381,10 @@ static inline void update_set_pool_write(FFVulkanContext *s, FFVkExecContext *e, · 2380 unmodified lines | |||
| 2381 | } | 2381 | } |
| 2382 | } | 2382 | } |
| 2383 | 2383 | ||
| 2384 | static int vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd, | 2384 | int 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 | ||
| 2528 | void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e, | 2528 | void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e, |
| @@ -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 | */ | ||
| 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 | |||
| 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. |