History

hwcontext_vulkan: improve public header documentation

Some things like using ImageLists were from a really old version that still used multiplanar images.

Lynne committed 6 years ago

Commit c6df6401 parent ea1a7f61 file · +10 −7Browse files

Unified · Split

libavutil/hwcontext_vulkan.h+10−7
@@ -76,7 +76,7 @@ typedef struct AVVulkanDeviceContext { · 75 unmodified lines
7676 int queue_family_comp_index;
7777 int nb_comp_queues;
7878 /**
79− * Enabled instance extensions. By default, VK_KHR_surface is enabled if found.
79+ * Enabled instance extensions.
8080 * If supplying your own device context, set this to an array of strings, with
8181 * each entry containing the specified Vulkan extension string to enable.
8282 * Duplicates are possible and accepted.
@@ -108,7 +108,7 @@ typedef struct AVVulkanDeviceContext { · 25 unmodified lines
108108 */
109109 typedef struct AVVulkanFramesContext {
110110 /**
111− * Controls the tiling of output frames.
111+ * Controls the tiling of allocated frames.
112112 */
113113 VkImageTiling tiling;
114114 /**
@@ -117,15 +117,15 @@ typedef struct AVVulkanFramesContext { · 2 unmodified lines
117117 */
118118 VkImageUsageFlagBits usage;
119119 /**
120− * Extension data for image creation. By default, if the extension is
121− * available, this will be chained to a VkImageFormatListCreateInfoKHR.
120+ * Extension data for image creation.
122121 */
123122 void *create_pnext;
124123 /**
125124 * Extension data for memory allocation. Must have as many entries as
126125 * the number of planes of the sw_format.
127126 * This will be chained to VkExportMemoryAllocateInfo, which is used
128− * to make all pool images exportable to other APIs.
127+ * to make all pool images exportable to other APIs if the necessary
128+ * extensions are present in enabled_dev_extensions.
129129 */
130130 void *alloc_pnext[AV_NUM_DATA_POINTERS];
131131 } AVVulkanFramesContext;
@@ -150,7 +150,7 @@ typedef struct AVVkFrame { · 18 unmodified lines
150150 VkImage img[AV_NUM_DATA_POINTERS];
151151
152152 /**
153− * Same tiling must be used for all images.
153+ * The same tiling must be used for all images in the frame.
154154 */
155155 VkImageTiling tiling;
156156
@@ -173,8 +173,10 @@ typedef struct AVVkFrame { · 16 unmodified lines
173173 VkImageLayout layout[AV_NUM_DATA_POINTERS];
174174
175175 /**
176− * Per-image semaphores. Must not be freed manually. Must be waited on
176+ * Synchronization semaphores. Must not be freed manually. Must be waited on
177177 * and signalled at every queue submission.
178+ * Could be less than the amount of images: either one per VkDeviceMemory
179+ * or one for the entire frame. All others will be set to VK_NULL_HANDLE.
178180 */
179181 VkSemaphore sem[AV_NUM_DATA_POINTERS];
180182
@@ -192,6 +194,7 @@ AVVkFrame *av_vk_frame_alloc(void); · 11 unmodified lines
192194
193195 /**
194196 * Returns the format of each image up to the number of planes for a given sw_format.
197+ * Returns NULL on unsupported formats.
195198 */
196199 const VkFormat *av_vkfmt_from_pixfmt(enum AVPixelFormat p);
197200

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