docs/vulkan: use hawkmoth instead of doxygen
Use the hawkmoth c:auto* directives to incorporate vulkan documentation. Convert @param style parameter descriptions to rst info field lists. Add static stubs for generated headers. Fix a lot of references, in particular the symbols are now in the Sphinx C domain, not C++ domain. Tweak syntax here and there. Based on the earlier work by Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24507>
This commit is contained in:
@@ -60,6 +60,7 @@ struct vk_attachment_state {
|
||||
VkClearValue clear_value;
|
||||
};
|
||||
|
||||
/** Command buffer ops */
|
||||
struct vk_command_buffer_ops {
|
||||
/** Creates a command buffer
|
||||
*
|
||||
@@ -147,11 +148,11 @@ struct vk_command_buffer {
|
||||
* call. This means that there can be no more than one such label at a
|
||||
* time.
|
||||
*
|
||||
* \c labels contains all active labels at this point in order of submission
|
||||
* \c region_begin denotes whether the most recent label opens a new region
|
||||
* If \t labels is empty \t region_begin must be true.
|
||||
* ``labels`` contains all active labels at this point in order of
|
||||
* submission ``region_begin`` denotes whether the most recent label opens
|
||||
* a new region If ``labels`` is empty ``region_begin`` must be true.
|
||||
*
|
||||
* Anytime we modify labels, we first check for \c region_begin. If it's
|
||||
* Anytime we modify labels, we first check for ``region_begin``. If it's
|
||||
* false, it means that the most recent label was submitted by
|
||||
* `*InsertDebugUtilsLabel` and we need to remove it before doing anything
|
||||
* else.
|
||||
|
||||
@@ -62,12 +62,12 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(vk_command_pool, base, VkCommandPool,
|
||||
|
||||
/** Initialize a vk_command_pool
|
||||
*
|
||||
* @param[in] device The Vulkan device
|
||||
* @param[out] pool The command pool to initialize
|
||||
* @param[in] pCreateInfo VkCommandPoolCreateInfo pointer passed to
|
||||
* `vkCreateCommandPool()`
|
||||
* @param[in] pAllocator Allocation callbacks passed to
|
||||
* `vkCreateCommandPool()`
|
||||
* :param device: |in| The Vulkan device
|
||||
* :param pool: |out| The command pool to initialize
|
||||
* :param pCreateInfo: |in| VkCommandPoolCreateInfo pointer passed to
|
||||
* `vkCreateCommandPool()`
|
||||
* :param pAllocator: |in| Allocation callbacks passed to
|
||||
* `vkCreateCommandPool()`
|
||||
*/
|
||||
VkResult MUST_CHECK
|
||||
vk_command_pool_init(struct vk_device *device,
|
||||
@@ -77,7 +77,7 @@ vk_command_pool_init(struct vk_device *device,
|
||||
|
||||
/** Tear down a vk_command_pool
|
||||
*
|
||||
* @param[inout] pool The command pool to tear down
|
||||
* :param pool: |inout| The command pool to tear down
|
||||
*/
|
||||
void
|
||||
vk_command_pool_finish(struct vk_command_pool *pool);
|
||||
@@ -90,8 +90,8 @@ vk_command_pool_finish(struct vk_command_pool *pool);
|
||||
* should be called before doing any driver-specific trimming in case it ends
|
||||
* up returning driver-internal resources to the pool.
|
||||
*
|
||||
* @param[inout] pool The command pool to trim
|
||||
* @param[in] flags Flags controling the trim operation
|
||||
* :param pool: |inout| The command pool to trim
|
||||
* :param flags: |in| Flags controling the trim operation
|
||||
*/
|
||||
void
|
||||
vk_command_pool_trim(struct vk_command_pool *pool,
|
||||
|
||||
@@ -44,8 +44,8 @@ enum vk_queue_submit_mode {
|
||||
/** Submits happen immediately
|
||||
*
|
||||
* `vkQueueSubmit()` and `vkQueueBindSparse()` call
|
||||
* `vk_queue::driver_submit` directly for all submits and the last call to
|
||||
* `vk_queue::driver_submit` will have completed by the time
|
||||
* ``vk_queue::driver_submit`` directly for all submits and the last call to
|
||||
* ``vk_queue::driver_submit`` will have completed by the time
|
||||
* `vkQueueSubmit()` or `vkQueueBindSparse()` return.
|
||||
*/
|
||||
VK_QUEUE_SUBMIT_MODE_IMMEDIATE,
|
||||
@@ -73,7 +73,7 @@ enum vk_queue_submit_mode {
|
||||
* semaphores after waiting on them.
|
||||
*
|
||||
* 3. All vk_sync types used as permanent payloads of semaphores support
|
||||
* `vk_sync_type::move` so that it can move the pending signal into a
|
||||
* ``vk_sync_type::move`` so that it can move the pending signal into a
|
||||
* temporary vk_sync and reset the semaphore.
|
||||
*
|
||||
* This is requied for shared timeline semaphores where we need to handle
|
||||
@@ -156,7 +156,7 @@ struct vk_device {
|
||||
/** Checks the status of this device
|
||||
*
|
||||
* This is expected to return either VK_SUCCESS or VK_ERROR_DEVICE_LOST.
|
||||
* It is called before vk_queue::driver_submit and after every non-trivial
|
||||
* It is called before ``vk_queue::driver_submit`` and after every non-trivial
|
||||
* wait operation to ensure the device is still around. This gives the
|
||||
* driver a hook to ask the kernel if its device is still valid. If the
|
||||
* kernel says the device has been lost, it MUST call vk_device_set_lost().
|
||||
@@ -173,10 +173,10 @@ struct vk_device {
|
||||
* anyway.
|
||||
*
|
||||
* If `signal_memory` is set, the resulting vk_sync will be used to signal
|
||||
* the memory object from a queue via vk_queue_submit::signals. The common
|
||||
* the memory object from a queue ``via vk_queue_submit::signals``. The common
|
||||
* code guarantees that, by the time vkQueueSubmit() returns, the signal
|
||||
* operation has been submitted to the kernel via the driver's
|
||||
* vk_queue::driver_submit hook. This means that any vkQueueSubmit() call
|
||||
* ``vk_queue::driver_submit`` hook. This means that any vkQueueSubmit() call
|
||||
* which needs implicit synchronization may block.
|
||||
*
|
||||
* If `signal_memory` is not set, it can be assumed that memory object
|
||||
@@ -269,20 +269,20 @@ VK_DEFINE_HANDLE_CASTS(vk_device, base, VkDevice,
|
||||
*
|
||||
* Along with initializing the data structures in `vk_device`, this function
|
||||
* checks that every extension specified by
|
||||
* `VkInstanceCreateInfo::ppEnabledExtensionNames` is actually supported by
|
||||
* ``VkInstanceCreateInfo::ppEnabledExtensionNames`` is actually supported by
|
||||
* the physical device and returns `VK_ERROR_EXTENSION_NOT_PRESENT` if an
|
||||
* unsupported extension is requested. It also checks all the feature struct
|
||||
* chained into the `pCreateInfo->pNext` chain against the features returned
|
||||
* by `vkGetPhysicalDeviceFeatures2` and returns
|
||||
* `VK_ERROR_FEATURE_NOT_PRESENT` if an unsupported feature is requested.
|
||||
*
|
||||
* @param[out] device The device to initialize
|
||||
* @param[in] physical_device The physical device
|
||||
* @param[in] dispatch_table Device-level dispatch table
|
||||
* @param[in] pCreateInfo VkDeviceCreateInfo pointer passed to
|
||||
* `vkCreateDevice()`
|
||||
* @param[in] alloc Allocation callbacks passed to
|
||||
* `vkCreateDevice()`
|
||||
* :param device: |out| The device to initialize
|
||||
* :param physical_device: |in| The physical device
|
||||
* :param dispatch_table: |in| Device-level dispatch table
|
||||
* :param pCreateInfo: |in| VkDeviceCreateInfo pointer passed to
|
||||
* `vkCreateDevice()`
|
||||
* :param alloc: |in| Allocation callbacks passed to
|
||||
* `vkCreateDevice()`
|
||||
*/
|
||||
VkResult MUST_CHECK
|
||||
vk_device_init(struct vk_device *device,
|
||||
@@ -299,7 +299,7 @@ vk_device_set_drm_fd(struct vk_device *device, int drm_fd)
|
||||
|
||||
/** Tears down a vk_device
|
||||
*
|
||||
* @param[out] device The device to tear down
|
||||
* :param device: |out| The device to tear down
|
||||
*/
|
||||
void
|
||||
vk_device_finish(struct vk_device *device);
|
||||
|
||||
@@ -113,13 +113,14 @@ enum mesa_vk_dynamic_graphics_state {
|
||||
* This function maps a VkPipelineDynamicStateCreateInfo to a bitset indexed
|
||||
* by mesa_vk_dynamic_graphics_state enumerants.
|
||||
*
|
||||
* @param[out] dynamic Bitset to populate
|
||||
* @param[in] info VkPipelineDynamicStateCreateInfo or NULL
|
||||
* :param dynamic: |out| Bitset to populate
|
||||
* :param info: |in| VkPipelineDynamicStateCreateInfo or NULL
|
||||
*/
|
||||
void
|
||||
vk_get_dynamic_graphics_states(BITSET_WORD *dynamic,
|
||||
const VkPipelineDynamicStateCreateInfo *info);
|
||||
|
||||
/***/
|
||||
struct vk_vertex_binding_state {
|
||||
/** VkVertexInputBindingDescription::stride */
|
||||
uint16_t stride;
|
||||
@@ -131,6 +132,7 @@ struct vk_vertex_binding_state {
|
||||
uint32_t divisor;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_vertex_attribute_state {
|
||||
/** VkVertexInputAttributeDescription::binding */
|
||||
uint32_t binding;
|
||||
@@ -142,6 +144,7 @@ struct vk_vertex_attribute_state {
|
||||
uint32_t offset;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_vertex_input_state {
|
||||
/** Bitset of which bindings are valid, indexed by binding */
|
||||
uint32_t bindings_valid;
|
||||
@@ -152,6 +155,7 @@ struct vk_vertex_input_state {
|
||||
struct vk_vertex_attribute_state attributes[MESA_VK_MAX_VERTEX_ATTRIBUTES];
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_input_assembly_state {
|
||||
/** VkPipelineInputAssemblyStateCreateInfo::topology
|
||||
*
|
||||
@@ -166,6 +170,7 @@ struct vk_input_assembly_state {
|
||||
bool primitive_restart_enable;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_tessellation_state {
|
||||
/** VkPipelineTessellationStateCreateInfo::patchControlPoints
|
||||
*
|
||||
@@ -180,6 +185,7 @@ struct vk_tessellation_state {
|
||||
uint8_t domain_origin;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_viewport_state {
|
||||
/** VkPipelineViewportDepthClipControlCreateInfoEXT::negativeOneToOne
|
||||
*/
|
||||
@@ -210,6 +216,7 @@ struct vk_viewport_state {
|
||||
VkRect2D scissors[MESA_VK_MAX_SCISSORS];
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_discard_rectangles_state {
|
||||
/** VkPipelineDiscardRectangleStateCreateInfoEXT::discardRectangleMode */
|
||||
VkDiscardRectangleModeEXT mode;
|
||||
@@ -232,6 +239,7 @@ enum ENUM_PACKED vk_mesa_depth_clip_enable {
|
||||
VK_MESA_DEPTH_CLIP_ENABLE_NOT_CLAMP,
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_rasterization_state {
|
||||
/** VkPipelineRasterizationStateCreateInfo::rasterizerDiscardEnable
|
||||
*
|
||||
@@ -385,6 +393,7 @@ vk_rasterization_state_depth_clip_enable(const struct vk_rasterization_state *rs
|
||||
unreachable("Invalid depth clip enable");
|
||||
}
|
||||
|
||||
/***/
|
||||
struct vk_fragment_shading_rate_state {
|
||||
/** VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize
|
||||
*
|
||||
@@ -399,6 +408,7 @@ struct vk_fragment_shading_rate_state {
|
||||
VkFragmentShadingRateCombinerOpKHR combiner_ops[2];
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_sample_locations_state {
|
||||
/** VkSampleLocationsInfoEXT::sampleLocationsPerPixel */
|
||||
VkSampleCountFlagBits per_pixel;
|
||||
@@ -410,6 +420,7 @@ struct vk_sample_locations_state {
|
||||
VkSampleLocationEXT locations[MESA_VK_MAX_SAMPLE_LOCATIONS];
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_multisample_state {
|
||||
/** VkPipelineMultisampleStateCreateInfo::rasterizationSamples */
|
||||
VkSampleCountFlagBits rasterization_samples;
|
||||
@@ -480,6 +491,7 @@ struct vk_stencil_test_face_state {
|
||||
uint8_t reference;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_depth_stencil_state {
|
||||
struct {
|
||||
/** VkPipelineDepthStencilStateCreateInfo::depthTestEnable
|
||||
@@ -550,12 +562,12 @@ struct vk_depth_stencil_state {
|
||||
* hit. This function attempts to optimize the depth stencil state and
|
||||
* disable writes and sometimes even testing whenever possible.
|
||||
*
|
||||
* @param[inout] ds The depth stencil state to optimize
|
||||
* @param[in] ds_aspects Which image aspects are present in the
|
||||
* render pass.
|
||||
* @param[in] consider_write_mask If true, the write mask will be taken
|
||||
* into account when optimizing. If
|
||||
* false, it will be ignored.
|
||||
* :param ds: |inout| The depth stencil state to optimize
|
||||
* :param ds_aspects: |in| Which image aspects are present in the
|
||||
* render pass.
|
||||
* :param consider_write_mask: |in| If true, the write mask will be taken
|
||||
* into account when optimizing. If
|
||||
* false, it will be ignored.
|
||||
*/
|
||||
void vk_optimize_depth_stencil_state(struct vk_depth_stencil_state *ds,
|
||||
VkImageAspectFlags ds_aspects,
|
||||
@@ -613,6 +625,7 @@ struct vk_color_blend_attachment_state {
|
||||
VkBlendOp alpha_blend_op;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_color_blend_state {
|
||||
/** VkPipelineColorBlendStateCreateInfo::logicOpEnable
|
||||
*
|
||||
@@ -650,6 +663,7 @@ struct vk_color_blend_state {
|
||||
float blend_constants[4];
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_render_pass_state {
|
||||
/** Set of image aspects bound as color/depth/stencil attachments
|
||||
*
|
||||
@@ -827,6 +841,7 @@ struct vk_dynamic_graphics_state {
|
||||
BITSET_DECLARE(dirty, MESA_VK_DYNAMIC_GRAPHICS_STATE_ENUM_MAX);
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_graphics_pipeline_all_state {
|
||||
struct vk_vertex_input_state vi;
|
||||
struct vk_input_assembly_state ia;
|
||||
@@ -842,6 +857,7 @@ struct vk_graphics_pipeline_all_state {
|
||||
struct vk_render_pass_state rp;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_graphics_pipeline_state {
|
||||
/** Bitset of which states are dynamic */
|
||||
BITSET_DECLARE(dynamic, MESA_VK_DYNAMIC_GRAPHICS_STATE_ENUM_MAX);
|
||||
@@ -905,24 +921,24 @@ struct vk_graphics_pipeline_state {
|
||||
* to this new blob of memory is returned via `alloc_ptr_out` and must
|
||||
* eventually be freed by the driver.
|
||||
*
|
||||
* @param[in] device The Vulkan device
|
||||
* @param[out] state The graphics pipeline state to populate
|
||||
* @param[in] info The pCreateInfo from vkCreateGraphicsPipelines
|
||||
* @param[in] driver_rp Renderpass state if the driver implements render
|
||||
* :param device: |in| The Vulkan device
|
||||
* :param state: |out| The graphics pipeline state to populate
|
||||
* :param info: |in| The pCreateInfo from vkCreateGraphicsPipelines
|
||||
* :param driver_rp: |in| Renderpass state if the driver implements render
|
||||
* passes itself. This should be NULL for drivers
|
||||
* that use the common render pass infrastructure
|
||||
* built on top of dynamic rendering.
|
||||
* @param[in] all The vk_graphics_pipeline_all_state to use to
|
||||
* :param all: |in| The vk_graphics_pipeline_all_state to use to
|
||||
* back any newly needed states. If NULL, newly
|
||||
* needed states will be dynamically allocated
|
||||
* instead.
|
||||
* @param[in] alloc Allocation callbacks for dynamically allocating
|
||||
* :param alloc: |in| Allocation callbacks for dynamically allocating
|
||||
* new state memory.
|
||||
* @param[in] scope Allocation scope for dynamically allocating new
|
||||
* :param scope: |in| Allocation scope for dynamically allocating new
|
||||
* state memory.
|
||||
* @param[out] alloc_ptr_out Will be populated with a pointer to any newly
|
||||
* allocated state. The driver is responsible for
|
||||
* freeing this pointer.
|
||||
* :param alloc_ptr_out: |out| Will be populated with a pointer to any newly
|
||||
* allocated state. The driver is responsible for
|
||||
* freeing this pointer.
|
||||
*/
|
||||
VkResult
|
||||
vk_graphics_pipeline_state_fill(const struct vk_device *device,
|
||||
@@ -968,16 +984,16 @@ vk_graphics_pipeline_state_fill(const struct vk_device *device,
|
||||
*
|
||||
* In this case we will avoid allocating memory for `library->state.foo`.
|
||||
*
|
||||
* @param[in] device The Vulkan device
|
||||
* @param[out] state The graphics pipeline state to populate
|
||||
* @param[in] old_state The graphics pipeline state to copy from
|
||||
* @param[in] alloc Allocation callbacks for dynamically allocating
|
||||
* :param device: |in| The Vulkan device
|
||||
* :param state: |out| The graphics pipeline state to populate
|
||||
* :param old_state: |in| The graphics pipeline state to copy from
|
||||
* :param alloc: |in| Allocation callbacks for dynamically allocating
|
||||
* new state memory.
|
||||
* @param[in] scope Allocation scope for dynamically allocating new
|
||||
* :param scope: |in| Allocation scope for dynamically allocating new
|
||||
* state memory.
|
||||
* @param[out] alloc_ptr_out Will be populated with a pointer to any newly
|
||||
* allocated state. The driver is responsible for
|
||||
* freeing this pointer.
|
||||
* :param alloc_ptr_out: |out| Will be populated with a pointer to any newly
|
||||
* allocated state. The driver is responsible for
|
||||
* freeing this pointer.
|
||||
*/
|
||||
VkResult
|
||||
vk_graphics_pipeline_state_copy(const struct vk_device *device,
|
||||
@@ -995,9 +1011,9 @@ vk_graphics_pipeline_state_copy(const struct vk_device *device,
|
||||
* The only exception here is render pass state which may be only partially
|
||||
* defined in which case the fully defined one (if any) is used.
|
||||
*
|
||||
* @param[out] dst The destination state. When the function returns, this
|
||||
* will be the union of the original dst and src.
|
||||
* @param[in] src The source state
|
||||
* :param dst: |out| The destination state. When the function returns, this
|
||||
* will be the union of the original dst and src.
|
||||
* :param src: |in| The source state
|
||||
*/
|
||||
void
|
||||
vk_graphics_pipeline_state_merge(struct vk_graphics_pipeline_state *dst,
|
||||
@@ -1015,24 +1031,24 @@ extern const struct vk_dynamic_graphics_state vk_default_dynamic_graphics_state;
|
||||
|
||||
/** Initialize a vk_dynamic_graphics_state with defaults
|
||||
*
|
||||
* @param[out] dyn Dynamic graphics state to initizlie
|
||||
* :param dyn: |out| Dynamic graphics state to initizlie
|
||||
*/
|
||||
void
|
||||
vk_dynamic_graphics_state_init(struct vk_dynamic_graphics_state *dyn);
|
||||
|
||||
/** Clear a vk_dynamic_graphics_state to defaults
|
||||
*
|
||||
* @param[out] dyn Dynamic graphics state to initizlie
|
||||
* :param dyn: |out| Dynamic graphics state to initizlie
|
||||
*/
|
||||
void
|
||||
vk_dynamic_graphics_state_clear(struct vk_dynamic_graphics_state *dyn);
|
||||
|
||||
/** Initialize a vk_dynamic_graphics_state for a pipeline
|
||||
*
|
||||
* @param[out] dyn Dynamic graphics state to initizlie
|
||||
* @param[in] supported Bitset of all dynamic state supported by the driver.
|
||||
* @param[in] p The pipeline state from which to initialize the
|
||||
* dynamic state.
|
||||
* :param dyn: |out| Dynamic graphics state to initizlie
|
||||
* :param supported: |in| Bitset of all dynamic state supported by the driver.
|
||||
* :param p: |in| The pipeline state from which to initialize the
|
||||
* dynamic state.
|
||||
*/
|
||||
void
|
||||
vk_dynamic_graphics_state_fill(struct vk_dynamic_graphics_state *dyn,
|
||||
@@ -1040,7 +1056,7 @@ vk_dynamic_graphics_state_fill(struct vk_dynamic_graphics_state *dyn,
|
||||
|
||||
/** Mark all states in the given vk_dynamic_graphics_state dirty
|
||||
*
|
||||
* @param[out] d Dynamic graphics state struct
|
||||
* :param d: |out| Dynamic graphics state struct
|
||||
*/
|
||||
static inline void
|
||||
vk_dynamic_graphics_state_dirty_all(struct vk_dynamic_graphics_state *d)
|
||||
@@ -1050,7 +1066,7 @@ vk_dynamic_graphics_state_dirty_all(struct vk_dynamic_graphics_state *d)
|
||||
|
||||
/** Mark all states in the given vk_dynamic_graphics_state not dirty
|
||||
*
|
||||
* @param[out] d Dynamic graphics state struct
|
||||
* :param d: |out| Dynamic graphics state struct
|
||||
*/
|
||||
static inline void
|
||||
vk_dynamic_graphics_state_clear_dirty(struct vk_dynamic_graphics_state *d)
|
||||
@@ -1060,8 +1076,8 @@ vk_dynamic_graphics_state_clear_dirty(struct vk_dynamic_graphics_state *d)
|
||||
|
||||
/** Test if any states in the given vk_dynamic_graphics_state are dirty
|
||||
*
|
||||
* @param[in] d Dynamic graphics state struct to test
|
||||
* @returns true if any state is dirty
|
||||
* :param d: |in| Dynamic graphics state struct to test
|
||||
* :returns: true if any state is dirty
|
||||
*/
|
||||
static inline bool
|
||||
vk_dynamic_graphics_state_any_dirty(const struct vk_dynamic_graphics_state *d)
|
||||
@@ -1076,8 +1092,8 @@ vk_dynamic_graphics_state_any_dirty(const struct vk_dynamic_graphics_state *d)
|
||||
* structs. Anything not set in src, as indicated by src->set, is ignored and
|
||||
* those bits of dst are left untouched.
|
||||
*
|
||||
* @param[out] dst Copy destination
|
||||
* @param[in] src Copy source
|
||||
* :param dst: |out| Copy destination
|
||||
* :param src: |in| Copy source
|
||||
*/
|
||||
void
|
||||
vk_dynamic_graphics_state_copy(struct vk_dynamic_graphics_state *dst,
|
||||
@@ -1088,8 +1104,8 @@ vk_dynamic_graphics_state_copy(struct vk_dynamic_graphics_state *dst,
|
||||
* Anything not set, as indicated by src->set, is ignored and those states in
|
||||
* the command buffer are left untouched.
|
||||
*
|
||||
* @param[inout] cmd Command buffer to update
|
||||
* @param[in] src State to set
|
||||
* :param cmd: |inout| Command buffer to update
|
||||
* :param src: |in| State to set
|
||||
*/
|
||||
void
|
||||
vk_cmd_set_dynamic_graphics_state(struct vk_command_buffer *cmd,
|
||||
@@ -1099,10 +1115,10 @@ vk_cmd_set_dynamic_graphics_state(struct vk_command_buffer *cmd,
|
||||
*
|
||||
* This is the dynamic state part of vkCmdBindVertexBuffers2().
|
||||
*
|
||||
* @param[inout] cmd Command buffer to update
|
||||
* @param[in] first_binding First binding to update
|
||||
* @param[in] binding_count Number of bindings to update
|
||||
* @param[in] strides binding_count many stride values to set
|
||||
* :param cmd: |inout| Command buffer to update
|
||||
* :param first_binding: |in| First binding to update
|
||||
* :param binding_count: |in| Number of bindings to update
|
||||
* :param strides: |in| binding_count many stride values to set
|
||||
*/
|
||||
void
|
||||
vk_cmd_set_vertex_binding_strides(struct vk_command_buffer *cmd,
|
||||
|
||||
@@ -183,18 +183,18 @@ VK_DEFINE_HANDLE_CASTS(vk_instance, base, VkInstance,
|
||||
* Along with initializing the data structures in `vk_instance`, this function
|
||||
* validates the Vulkan version number provided by the client and checks that
|
||||
* every extension specified by
|
||||
* `VkInstanceCreateInfo::ppEnabledExtensionNames` is actually supported by
|
||||
* ``VkInstanceCreateInfo::ppEnabledExtensionNames`` is actually supported by
|
||||
* the implementation and returns `VK_ERROR_EXTENSION_NOT_PRESENT` if an
|
||||
* unsupported extension is requested.
|
||||
*
|
||||
* @param[out] instance The instance to initialize
|
||||
* @param[in] supported_extensions Table of all instance extensions supported
|
||||
* by this instance
|
||||
* @param[in] dispatch_table Instance-level dispatch table
|
||||
* @param[in] pCreateInfo VkInstanceCreateInfo pointer passed to
|
||||
* `vkCreateInstance()`
|
||||
* @param[in] alloc Allocation callbacks used to create this
|
||||
* instance; must not be `NULL`
|
||||
* :param instance: |out| The instance to initialize
|
||||
* :param supported_extensions: |in| Table of all instance extensions supported
|
||||
* by this instance
|
||||
* :param dispatch_table: |in| Instance-level dispatch table
|
||||
* :param pCreateInfo: |in| VkInstanceCreateInfo pointer passed to
|
||||
* `vkCreateInstance()`
|
||||
* :param alloc: |in| Allocation callbacks used to create this
|
||||
* instance; must not be `NULL`
|
||||
*/
|
||||
VkResult MUST_CHECK
|
||||
vk_instance_init(struct vk_instance *instance,
|
||||
@@ -205,7 +205,7 @@ vk_instance_init(struct vk_instance *instance,
|
||||
|
||||
/** Tears down a vk_instance
|
||||
*
|
||||
* @param[out] instance The instance to tear down
|
||||
* :param instance: |out| The instance to tear down
|
||||
*/
|
||||
void
|
||||
vk_instance_finish(struct vk_instance *instance);
|
||||
|
||||
@@ -69,9 +69,9 @@ struct vk_object_base {
|
||||
|
||||
/** Initialize a vk_base_object
|
||||
*
|
||||
* @param[in] device The vk_device this object was created from or NULL
|
||||
* @param[out] base The vk_object_base to initialize
|
||||
* @param[in] obj_type The VkObjectType of the object being initialized
|
||||
* :param device: |in| The vk_device this object was created from or NULL
|
||||
* :param base: |out| The vk_object_base to initialize
|
||||
* :param obj_type: |in| The VkObjectType of the object being initialized
|
||||
*/
|
||||
void vk_object_base_init(struct vk_device *device,
|
||||
struct vk_object_base *base,
|
||||
@@ -79,7 +79,7 @@ void vk_object_base_init(struct vk_device *device,
|
||||
|
||||
/** Tear down a vk_object_base
|
||||
*
|
||||
* @param[out] base The vk_object_base being torn down
|
||||
* :param base: |out| The vk_object_base being torn down
|
||||
*/
|
||||
void vk_object_base_finish(struct vk_object_base *base);
|
||||
|
||||
@@ -90,7 +90,7 @@ void vk_object_base_finish(struct vk_object_base *base);
|
||||
* long as it's called between when the client thinks the object was destroyed
|
||||
* and when the client sees it again as a supposedly new object.
|
||||
*
|
||||
* @param[inout] base The vk_object_base being recycled
|
||||
* :param base: |inout| The vk_object_base being recycled
|
||||
*/
|
||||
void vk_object_base_recycle(struct vk_object_base *base);
|
||||
|
||||
@@ -118,16 +118,16 @@ vk_object_base_from_u64_handle(uint64_t handle, VkObjectType obj_type)
|
||||
* `VkObjectType` to assert that the object is of the correct type when
|
||||
* running with a debug build.
|
||||
*
|
||||
* @param __driver_type The name of the driver struct; it is assumed this is
|
||||
* the name of a struct type and `struct` will be
|
||||
* prepended automatically
|
||||
* :param __driver_type: The name of the driver struct; it is assumed this is
|
||||
* the name of a struct type and ``struct`` will be
|
||||
* prepended automatically
|
||||
*
|
||||
* @param __base The name of the vk_base_object member
|
||||
* :param __base: The name of the vk_base_object member
|
||||
*
|
||||
* @param __VkType The Vulkan object type such as VkImage
|
||||
* :param __VkType: The Vulkan object type such as VkImage
|
||||
*
|
||||
* @param __VK_TYPE The VkObjectType corresponding to __VkType, such as
|
||||
* VK_OBJECT_TYPE_IMAGE
|
||||
* :param __VK_TYPE: The VkObjectType corresponding to __VkType, such as
|
||||
* VK_OBJECT_TYPE_IMAGE
|
||||
*/
|
||||
#define VK_DEFINE_HANDLE_CASTS(__driver_type, __base, __VkType, __VK_TYPE) \
|
||||
static inline struct __driver_type * \
|
||||
@@ -157,16 +157,16 @@ vk_object_base_from_u64_handle(uint64_t handle, VkObjectType obj_type)
|
||||
* `VkObjectType` to assert that the object is of the correct type when
|
||||
* running with a debug build.
|
||||
*
|
||||
* @param __driver_type The name of the driver struct; it is assumed this is
|
||||
* the name of a struct type and `struct` will be
|
||||
* prepended automatically
|
||||
* :param __driver_type: The name of the driver struct; it is assumed this is
|
||||
* the name of a struct type and ``struct`` will be
|
||||
* prepended automatically
|
||||
*
|
||||
* @param __base The name of the vk_base_object member
|
||||
* :param __base: The name of the vk_base_object member
|
||||
*
|
||||
* @param __VkType The Vulkan object type such as VkImage
|
||||
* :param __VkType: The Vulkan object type such as VkImage
|
||||
*
|
||||
* @param __VK_TYPE The VkObjectType corresponding to __VkType, such as
|
||||
* VK_OBJECT_TYPE_IMAGE
|
||||
* :param __VK_TYPE: The VkObjectType corresponding to __VkType, such as
|
||||
* VK_OBJECT_TYPE_IMAGE
|
||||
*/
|
||||
#define VK_DEFINE_NONDISP_HANDLE_CASTS(__driver_type, __base, __VkType, __VK_TYPE) \
|
||||
UNUSED static inline struct __driver_type * \
|
||||
@@ -190,14 +190,14 @@ vk_object_base_from_u64_handle(uint64_t handle, VkObjectType obj_type)
|
||||
|
||||
/** Declares a __driver_type pointer which represents __handle
|
||||
*
|
||||
* @param __driver_type The name of the driver struct; it is assumed this is
|
||||
* the name of a struct type and `struct` will be
|
||||
* prepended automatically
|
||||
* :param __driver_type: The name of the driver struct; it is assumed this is
|
||||
* the name of a struct type and ``struct`` will be
|
||||
* prepended automatically
|
||||
*
|
||||
* @param __name The name of the declared pointer
|
||||
* :param __name: The name of the declared pointer
|
||||
*
|
||||
* @param __handle The Vulkan object handle with which to initialize
|
||||
* `__name`
|
||||
* :param __handle: The Vulkan object handle with which to initialize
|
||||
* `__name`
|
||||
*/
|
||||
#define VK_FROM_HANDLE(__driver_type, __name, __handle) \
|
||||
struct __driver_type *__name = __driver_type ## _from_handle(__handle)
|
||||
|
||||
@@ -117,14 +117,14 @@ VK_DEFINE_HANDLE_CASTS(vk_physical_device, base, VkPhysicalDevice,
|
||||
|
||||
/** Initialize a vk_physical_device
|
||||
*
|
||||
* @param[out] physical_device The physical device to initialize
|
||||
* @param[in] instance The instance which is the parent of this
|
||||
* physical device
|
||||
* @param[in] supported_extensions Table of all device extensions supported
|
||||
* by this physical device
|
||||
* @param[in] supported_features Table of all features supported by this
|
||||
* physical device
|
||||
* @param[in] dispatch_table Physical-device-level dispatch table
|
||||
* :param physical_device: |out| The physical device to initialize
|
||||
* :param instance: |in| The instance which is the parent of this
|
||||
* physical device
|
||||
* :param supported_extensions: |in| Table of all device extensions supported
|
||||
* by this physical device
|
||||
* :param supported_features: |in| Table of all features supported by this
|
||||
* physical device
|
||||
* :param dispatch_table: |in| Physical-device-level dispatch table
|
||||
*/
|
||||
VkResult MUST_CHECK
|
||||
vk_physical_device_init(struct vk_physical_device *physical_device,
|
||||
@@ -136,7 +136,7 @@ vk_physical_device_init(struct vk_physical_device *physical_device,
|
||||
|
||||
/** Tears down a vk_physical_device
|
||||
*
|
||||
* @param[out] physical_device The physical device to tear down
|
||||
* :param physical_device: |out| The physical device to tear down
|
||||
*/
|
||||
void
|
||||
vk_physical_device_finish(struct vk_physical_device *physical_device);
|
||||
|
||||
@@ -129,11 +129,11 @@ struct vk_queue {
|
||||
* call. This means that there can be no more than one such label at a
|
||||
* time.
|
||||
*
|
||||
* \c labels contains all active labels at this point in order of submission
|
||||
* \c region_begin denotes whether the most recent label opens a new region
|
||||
* If \t labels is empty \t region_begin must be true.
|
||||
* ``labels`` contains all active labels at this point in order of
|
||||
* submission ``region_begin`` denotes whether the most recent label opens
|
||||
* a new region If ``labels`` is empty ``region_begin`` must be true.
|
||||
*
|
||||
* Anytime we modify labels, we first check for \c region_begin. If it's
|
||||
* Anytime we modify labels, we first check for ``region_begin``. If it's
|
||||
* false, it means that the most recent label was submitted by
|
||||
* `*InsertDebugUtilsLabel` and we need to remove it before doing anything
|
||||
* else.
|
||||
|
||||
@@ -60,6 +60,7 @@ typedef struct VkRenderingAttachmentInitialLayoutInfoMESA {
|
||||
VkImageLayout initialLayout;
|
||||
} VkRenderingAttachmentInitialLayoutInfoMESA;
|
||||
|
||||
/***/
|
||||
struct vk_subpass_attachment {
|
||||
/** VkAttachmentReference2::attachment */
|
||||
uint32_t attachment;
|
||||
@@ -101,6 +102,7 @@ struct vk_subpass_attachment {
|
||||
struct vk_subpass_attachment *resolve;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_subpass {
|
||||
/** Count of all attachments referenced by this subpass */
|
||||
uint32_t attachment_count;
|
||||
@@ -179,6 +181,7 @@ struct vk_subpass {
|
||||
VkMultisampledRenderToSingleSampledInfoEXT mrtss;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_render_pass_attachment {
|
||||
/** VkAttachmentDescription2::format */
|
||||
VkFormat format;
|
||||
@@ -230,6 +233,7 @@ struct vk_render_pass_attachment {
|
||||
VkImageLayout final_stencil_layout;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_subpass_dependency {
|
||||
/** VkSubpassDependency2::dependencyFlags */
|
||||
VkDependencyFlags flags;
|
||||
@@ -256,6 +260,7 @@ struct vk_subpass_dependency {
|
||||
int32_t view_offset;
|
||||
};
|
||||
|
||||
/***/
|
||||
struct vk_render_pass {
|
||||
struct vk_object_base base;
|
||||
|
||||
@@ -303,7 +308,7 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(vk_render_pass, base, VkRenderPass,
|
||||
* is VK_NULL_HANDLE and there is a VkPipelineRenderingCreateInfo in the pNext
|
||||
* chain of VkGraphicsPipelineCreateInfo, it will return that.
|
||||
*
|
||||
* @param[in] info One of the pCreateInfos from vkCreateGraphicsPipelines
|
||||
* :param info: |in| One of the pCreateInfos from vkCreateGraphicsPipelines
|
||||
*/
|
||||
const VkPipelineRenderingCreateInfo *
|
||||
vk_get_pipeline_rendering_create_info(const VkGraphicsPipelineCreateInfo *info);
|
||||
@@ -322,7 +327,7 @@ vk_get_pipeline_rendering_create_info(const VkGraphicsPipelineCreateInfo *info);
|
||||
* If VkGraphicsPipelineCreateInfo::renderPass is VK_NULL_HANDLE, the relevant
|
||||
* flags from VkGraphicsPipelineCreateInfo::flags will be returned.
|
||||
*
|
||||
* @param[in] info One of the pCreateInfos from vkCreateGraphicsPipelines
|
||||
* :param info: |in| One of the pCreateInfos from vkCreateGraphicsPipelines
|
||||
*/
|
||||
VkPipelineCreateFlags
|
||||
vk_get_pipeline_rendering_flags(const VkGraphicsPipelineCreateInfo *info);
|
||||
@@ -337,7 +342,7 @@ vk_get_pipeline_rendering_flags(const VkGraphicsPipelineCreateInfo *info);
|
||||
* is VK_NULL_HANDLE and there is a VkAttachmentSampleCountInfoAMD in the pNext
|
||||
* chain of VkGraphicsPipelineCreateInfo, it will return that.
|
||||
*
|
||||
* @param[in] info One of the pCreateInfos from vkCreateGraphicsPipelines
|
||||
* :param info: |in| One of the pCreateInfos from vkCreateGraphicsPipelines
|
||||
*/
|
||||
const VkAttachmentSampleCountInfoAMD *
|
||||
vk_get_pipeline_sample_count_info_amd(const VkGraphicsPipelineCreateInfo *info);
|
||||
@@ -355,8 +360,8 @@ vk_get_pipeline_sample_count_info_amd(const VkGraphicsPipelineCreateInfo *info);
|
||||
* is a VkCommandBufferInheritanceRenderingInfo in the pNext chain of
|
||||
* VkCommandBufferBeginInfo, it will return that.
|
||||
*
|
||||
* @param[in] level The nesting level of this command buffer
|
||||
* @param[in] pBeginInfo The pBeginInfo from vkBeginCommandBuffer
|
||||
* :param level: |in| The nesting level of this command buffer
|
||||
* :param pBeginInfo: |in| The pBeginInfo from vkBeginCommandBuffer
|
||||
*/
|
||||
const VkCommandBufferInheritanceRenderingInfo *
|
||||
vk_get_command_buffer_inheritance_rendering_info(
|
||||
@@ -386,12 +391,12 @@ struct vk_gcbiarr_data {
|
||||
* constructed due to a missing framebuffer or similar, NULL will be
|
||||
* returned.
|
||||
*
|
||||
* @param[in] level The nesting level of this command buffer
|
||||
* @param[in] pBeginInfo The pBeginInfo from vkBeginCommandBuffer
|
||||
* @param[out] stack_data An opaque blob of data which will be overwritten by
|
||||
* this function, passed in from the caller to avoid
|
||||
* heap allocations. It must be at least
|
||||
* VK_GCBIARR_DATA_SIZE(max_color_rts) bytes.
|
||||
* :param level: |in| The nesting level of this command buffer
|
||||
* :param pBeginInfo: |in| The pBeginInfo from vkBeginCommandBuffer
|
||||
* :param stack_data: |out| An opaque blob of data which will be overwritten by
|
||||
* this function, passed in from the caller to avoid
|
||||
* heap allocations. It must be at least
|
||||
* VK_GCBIARR_DATA_SIZE(max_color_rts) bytes.
|
||||
*/
|
||||
const VkRenderingInfo *
|
||||
vk_get_command_buffer_inheritance_as_rendering_resume(
|
||||
|
||||
Reference in New Issue
Block a user