[FFmpeg-cvslog] hwcontext_vulkan: reorder structure fields and add spaces in between

Lynne git at videolan.org
Wed Apr 28 19:18:27 EEST 2021


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Wed Apr 28 01:39:25 2021 +0200| [3a3e8c35b63a40c4d59161097dc8652c15d13779] | committer: Lynne

hwcontext_vulkan: reorder structure fields and add spaces in between

We're in the middle of an ABI unstable period, so we're allowed to.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a3e8c35b63a40c4d59161097dc8652c15d13779
---

 libavutil/hwcontext_vulkan.h | 64 ++++++++++++++++++++++++++------------------
 1 file changed, 38 insertions(+), 26 deletions(-)

diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
index 5cbeb8e7ef..ab075a74e0 100644
--- a/libavutil/hwcontext_vulkan.h
+++ b/libavutil/hwcontext_vulkan.h
@@ -41,18 +41,51 @@ typedef struct AVVulkanDeviceContext {
      * Custom memory allocator, else NULL
      */
     const VkAllocationCallbacks *alloc;
+
     /**
      * Vulkan instance. Must be at least version 1.1.
      */
     VkInstance inst;
+
     /**
      * Physical device
      */
     VkPhysicalDevice phys_dev;
+
     /**
      * Active device
      */
     VkDevice act_dev;
+
+    /**
+     * This structure should be set to the set of features that present and enabled
+     * during device creation. When a device is created by FFmpeg, it will default to
+     * enabling all that are present of the shaderImageGatherExtended,
+     * fragmentStoresAndAtomics, shaderInt64 and vertexPipelineStoresAndAtomics features.
+     */
+    VkPhysicalDeviceFeatures2 device_features;
+
+    /**
+     * Enabled instance extensions.
+     * If supplying your own device context, set this to an array of strings, with
+     * each entry containing the specified Vulkan extension string to enable.
+     * Duplicates are possible and accepted.
+     * If no extensions are enabled, set these fields to NULL, and 0 respectively.
+     */
+    const char * const *enabled_inst_extensions;
+    int nb_enabled_inst_extensions;
+
+    /**
+     * Enabled device extensions. By default, VK_KHR_external_memory_fd,
+     * VK_EXT_external_memory_dma_buf, VK_EXT_image_drm_format_modifier,
+     * VK_KHR_external_semaphore_fd and VK_EXT_external_memory_host are enabled if found.
+     * If supplying your own device context, these fields takes the same format as
+     * the above fields, with the same conditions that duplicates are possible
+     * and accepted, and that NULL and 0 respectively means no extensions are enabled.
+     */
+    const char * const *enabled_dev_extensions;
+    int nb_enabled_dev_extensions;
+
     /**
      * Queue family index for graphics
      * @note av_hwdevice_create() will set all 3 queue indices if unset
@@ -63,6 +96,7 @@ typedef struct AVVulkanDeviceContext {
      */
     int queue_family_index;
     int nb_graphics_queues;
+
     /**
      * Queue family index to use for transfer operations, and the amount of queues
      * enabled. In case there is no dedicated transfer queue, nb_tx_queues
@@ -71,6 +105,7 @@ typedef struct AVVulkanDeviceContext {
      */
     int queue_family_tx_index;
     int nb_tx_queues;
+
     /**
      * Queue family index for compute ops, and the amount of queues enabled.
      * In case there are no dedicated compute queues, nb_comp_queues must be
@@ -78,32 +113,6 @@ typedef struct AVVulkanDeviceContext {
      */
     int queue_family_comp_index;
     int nb_comp_queues;
-    /**
-     * Enabled instance extensions.
-     * If supplying your own device context, set this to an array of strings, with
-     * each entry containing the specified Vulkan extension string to enable.
-     * Duplicates are possible and accepted.
-     * If no extensions are enabled, set these fields to NULL, and 0 respectively.
-     */
-    const char * const *enabled_inst_extensions;
-    int nb_enabled_inst_extensions;
-    /**
-     * Enabled device extensions. By default, VK_KHR_external_memory_fd,
-     * VK_EXT_external_memory_dma_buf, VK_EXT_image_drm_format_modifier,
-     * VK_KHR_external_semaphore_fd and VK_EXT_external_memory_host are enabled if found.
-     * If supplying your own device context, these fields takes the same format as
-     * the above fields, with the same conditions that duplicates are possible
-     * and accepted, and that NULL and 0 respectively means no extensions are enabled.
-     */
-    const char * const *enabled_dev_extensions;
-    int nb_enabled_dev_extensions;
-    /**
-     * This structure should be set to the set of features that present and enabled
-     * during device creation. When a device is created by FFmpeg, it will default to
-     * enabling all that are present of the shaderImageGatherExtended,
-     * fragmentStoresAndAtomics, shaderInt64 and vertexPipelineStoresAndAtomics features.
-     */
-    VkPhysicalDeviceFeatures2 device_features;
 } AVVulkanDeviceContext;
 
 /**
@@ -114,15 +123,18 @@ typedef struct AVVulkanFramesContext {
      * Controls the tiling of allocated frames.
      */
     VkImageTiling tiling;
+
     /**
      * Defines extra usage of output frames. If left as 0, the following bits
      * are set: TRANSFER_SRC, TRANSFER_DST. SAMPLED and STORAGE.
      */
     VkImageUsageFlagBits usage;
+
     /**
      * Extension data for image creation.
      */
     void *create_pnext;
+
     /**
      * Extension data for memory allocation. Must have as many entries as
      * the number of planes of the sw_format.



More information about the ffmpeg-cvslog mailing list