History

vulkan: rename ff_vk_set_descriptor_image to ff_vk_shader_update_img

Lynne committed 1 year ago

Commit 7046e651 parent 49af9742 files · +21 −21Browse files

Unified · Split

2 files
  1. libavutil/vulkan.c +17 −17
  2. libavutil/vulkan.h +4 −4
libavutil/vulkan.c+17−17
@@ -2355,10 +2355,10 @@ static inline void update_set_pool_write(FFVulkanContext *s, FFVkExecContext *e, · 2354 unmodified lines
23552355 }
23562356 }
23572357
2358−int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
2359− FFVkExecContext *e, int set, int bind, int offs,
2360− VkImageView view, VkImageLayout layout,
2361− VkSampler sampler)
2358+int ff_vk_shader_update_img(FFVulkanContext *s, FFVkExecContext *e,
2359+ FFVulkanShader *shd, int set, int bind, int offs,
2360+ VkImageView view, VkImageLayout layout,
2361+ VkSampler sampler)
23622362 {
23632363 FFVulkanDescriptorSet *desc_set = &shd->desc_set[set];
23642364
@@ -2420,6 +2420,19 @@ int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd, · 55 unmodified lines
24202420 return 0;
24212421 }
24222422
2423+void ff_vk_shader_update_img_array(FFVulkanContext *s, FFVkExecContext *e,
2424+ FFVulkanShader *shd, AVFrame *f,
2425+ VkImageView *views, int set, int binding,
2426+ VkImageLayout layout, VkSampler sampler)
2427+{
2428+ AVHWFramesContext *hwfc = (AVHWFramesContext *)f->hw_frames_ctx->data;
2429+ const int nb_planes = av_pix_fmt_count_planes(hwfc->sw_format);
2430+
2431+ for (int i = 0; i < nb_planes; i++)
2432+ ff_vk_shader_update_img(s, e, shd, set, binding, i,
2433+ views[i], layout, sampler);
2434+}
2435+
24232436 int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, FFVkExecContext *e,
24242437 FFVulkanShader *shd,
24252438 int set, int bind, int elem,
@@ -2486,19 +2499,6 @@ int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, FFVkExecContext *e, · 60 unmodified lines
24862499 return 0;
24872500 }
24882501
2489−void ff_vk_shader_update_img_array(FFVulkanContext *s, FFVkExecContext *e,
2490− FFVulkanShader *shd, AVFrame *f,
2491− VkImageView *views, int set, int binding,
2492− VkImageLayout layout, VkSampler sampler)
2493−{
2494− AVHWFramesContext *hwfc = (AVHWFramesContext *)f->hw_frames_ctx->data;
2495− const int nb_planes = av_pix_fmt_count_planes(hwfc->sw_format);
2496−
2497− for (int i = 0; i < nb_planes; i++)
2498− ff_vk_set_descriptor_image(s, shd, e, set, binding, i,
2499− views[i], layout, sampler);
2500−}
2501−
25022502 void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e,
25032503 FFVulkanShader *shd,
25042504 VkShaderStageFlagBits stage,
libavutil/vulkan.h+4−4
@@ -590,10 +590,10 @@ int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, FFVkExecContext *e, · 589 unmodified lines
590590 /**
591591 * Sets an image descriptor for specified shader and binding.
592592 */
593−int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
594− FFVkExecContext *e, int set, int bind, int offs,
595− VkImageView view, VkImageLayout layout,
596− VkSampler sampler);
593+int ff_vk_shader_update_img(FFVulkanContext *s, FFVkExecContext *e,
594+ FFVulkanShader *shd, int set, int bind, int offs,
595+ VkImageView view, VkImageLayout layout,
596+ VkSampler sampler);
597597
598598 /**
599599 * Update a descriptor in a buffer with an image array..

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