mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
vulkan: Mark some pointers to Vulkan info structures as const
These pointers are only used as read-only arguments, and should not be treated as mutable. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5736>
This commit is contained in:
parent
adf031a222
commit
848256a7f5
7 changed files with 19 additions and 15 deletions
|
@ -1013,7 +1013,7 @@ and/or use gtk-doc annotations. -->
|
|||
</parameter>
|
||||
<parameter name="buffer_info" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c">the VkBufferCreateInfo structure</doc>
|
||||
<type name="Vulkan.BufferCreateInfo" c:type="VkBufferCreateInfo*"/>
|
||||
<type name="Vulkan.BufferCreateInfo" c:type="const VkBufferCreateInfo*"/>
|
||||
</parameter>
|
||||
<parameter name="mem_prop_flags" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c">memory properties flags for the backing memory</doc>
|
||||
|
@ -4504,7 +4504,7 @@ It can be called from any thread.</doc>
|
|||
</parameter>
|
||||
<parameter name="req" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkmemory.c">memory requirements to look for</doc>
|
||||
<type name="Vulkan.MemoryRequirements" c:type="VkMemoryRequirements*"/>
|
||||
<type name="Vulkan.MemoryRequirements" c:type="const VkMemoryRequirements*"/>
|
||||
</parameter>
|
||||
<parameter name="properties" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkmemory.c">memory properties to search for</doc>
|
||||
|
@ -6936,7 +6936,7 @@ either be a user visible window (onscreen) or hidden (offscreen).</doc>
|
|||
</parameter>
|
||||
<parameter name="buffer_info" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c">the VkBufferCreateInfo structure</doc>
|
||||
<type name="Vulkan.BufferCreateInfo" c:type="VkBufferCreateInfo*"/>
|
||||
<type name="Vulkan.BufferCreateInfo" c:type="const VkBufferCreateInfo*"/>
|
||||
</parameter>
|
||||
<parameter name="mem_prop_flags" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkbuffermemory.c">memory properties flags for the backing memory</doc>
|
||||
|
@ -7253,7 +7253,7 @@ properties.</doc>
|
|||
</parameter>
|
||||
<parameter name="create_info" transfer-ownership="none" nullable="1" allow-none="1">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkutils.c">a VkImageViewCreateInfo</doc>
|
||||
<type name="Vulkan.ImageViewCreateInfo" c:type="VkImageViewCreateInfo*"/>
|
||||
<type name="Vulkan.ImageViewCreateInfo" c:type="const VkImageViewCreateInfo*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</function>
|
||||
|
@ -7507,7 +7507,7 @@ other elements in the pipeline</doc>
|
|||
</parameter>
|
||||
<parameter name="req" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkmemory.c">memory requirements to look for</doc>
|
||||
<type name="Vulkan.MemoryRequirements" c:type="VkMemoryRequirements*"/>
|
||||
<type name="Vulkan.MemoryRequirements" c:type="const VkMemoryRequirements*"/>
|
||||
</parameter>
|
||||
<parameter name="properties" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkmemory.c">memory properties to search for</doc>
|
||||
|
|
|
@ -98,8 +98,9 @@ _vk_buffer_mem_init (GstVulkanBufferMemory * mem, GstAllocator * allocator,
|
|||
static GstVulkanBufferMemory *
|
||||
_vk_buffer_mem_new_alloc_with_buffer_info (GstAllocator * allocator,
|
||||
GstMemory * parent, GstVulkanDevice * device,
|
||||
VkBufferCreateInfo * buffer_info, VkMemoryPropertyFlags mem_prop_flags,
|
||||
gpointer user_data, GDestroyNotify notify)
|
||||
const VkBufferCreateInfo * buffer_info,
|
||||
VkMemoryPropertyFlags mem_prop_flags, gpointer user_data,
|
||||
GDestroyNotify notify)
|
||||
{
|
||||
GstVulkanBufferMemory *mem = NULL;
|
||||
GstAllocationParams params = { 0, };
|
||||
|
@ -299,7 +300,8 @@ _vk_buffer_mem_free (GstAllocator * allocator, GstMemory * memory)
|
|||
*/
|
||||
GstMemory *
|
||||
gst_vulkan_buffer_memory_alloc_with_buffer_info (GstVulkanDevice * device,
|
||||
VkBufferCreateInfo * buffer_info, VkMemoryPropertyFlags mem_prop_flags)
|
||||
const VkBufferCreateInfo * buffer_info,
|
||||
VkMemoryPropertyFlags mem_prop_flags)
|
||||
{
|
||||
GstVulkanBufferMemory *mem;
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ GstMemory * gst_vulkan_buffer_memory_alloc (GstVulkanDevice * devi
|
|||
GST_VULKAN_API
|
||||
GstMemory * gst_vulkan_buffer_memory_alloc_with_buffer_info
|
||||
(GstVulkanDevice * device,
|
||||
VkBufferCreateInfo * buffer_info,
|
||||
const VkBufferCreateInfo * buffer_info,
|
||||
VkMemoryPropertyFlags mem_prop_flags);
|
||||
|
||||
GST_VULKAN_API
|
||||
|
|
|
@ -294,7 +294,7 @@ _vk_mem_free (GstAllocator * allocator, GstMemory * memory)
|
|||
*/
|
||||
gboolean
|
||||
gst_vulkan_memory_find_memory_type_index_with_requirements (GstVulkanDevice *
|
||||
device, VkMemoryRequirements * req, VkMemoryPropertyFlags properties,
|
||||
device, const VkMemoryRequirements * req, VkMemoryPropertyFlags properties,
|
||||
guint32 * type_index)
|
||||
{
|
||||
guint32 i;
|
||||
|
|
|
@ -148,7 +148,7 @@ GstMemory * gst_vulkan_memory_alloc (GstVulkanDevice * device,
|
|||
|
||||
GST_VULKAN_API
|
||||
gboolean gst_vulkan_memory_find_memory_type_index_with_requirements (GstVulkanDevice * device,
|
||||
VkMemoryRequirements * req,
|
||||
const VkMemoryRequirements * req,
|
||||
VkMemoryPropertyFlags properties,
|
||||
guint32 * type_index);
|
||||
|
||||
|
|
|
@ -432,7 +432,8 @@ fill_vulkan_image_view_info (VkImage image, VkFormat format,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
find_compatible_view (GstVulkanImageView * view, VkImageViewCreateInfo * info)
|
||||
find_compatible_view (GstVulkanImageView * view,
|
||||
const VkImageViewCreateInfo * info)
|
||||
{
|
||||
return view->create_info.image == info->image
|
||||
&& view->create_info.format == info->format
|
||||
|
@ -483,7 +484,7 @@ gst_vulkan_get_or_create_image_view (GstVulkanImageMemory * image)
|
|||
*/
|
||||
GstVulkanImageView *
|
||||
gst_vulkan_get_or_create_image_view_with_info (GstVulkanImageMemory * image,
|
||||
VkImageViewCreateInfo * create_info)
|
||||
const VkImageViewCreateInfo * create_info)
|
||||
{
|
||||
VkImageViewCreateInfo _create_info;
|
||||
GstVulkanImageView *ret;
|
||||
|
@ -498,7 +499,8 @@ gst_vulkan_get_or_create_image_view_with_info (GstVulkanImageMemory * image,
|
|||
}
|
||||
|
||||
ret = gst_vulkan_image_memory_find_view (image,
|
||||
(GstVulkanImageMemoryFindViewFunc) find_compatible_view, create_info);
|
||||
(GstVulkanImageMemoryFindViewFunc) find_compatible_view,
|
||||
(gpointer) create_info);
|
||||
if (!ret) {
|
||||
ret = gst_vulkan_image_view_new (image, create_info);
|
||||
gst_vulkan_image_memory_add_view (image, ret);
|
||||
|
|
|
@ -57,7 +57,7 @@ GstVulkanImageView * gst_vulkan_get_or_create_image_view (GstVulkanImageM
|
|||
|
||||
GST_VULKAN_API
|
||||
GstVulkanImageView * gst_vulkan_get_or_create_image_view_with_info (GstVulkanImageMemory * image,
|
||||
VkImageViewCreateInfo * create_info);
|
||||
const VkImageViewCreateInfo * create_info);
|
||||
|
||||
GST_VULKAN_API
|
||||
GstVulkanHandle * gst_vulkan_create_shader (GstVulkanDevice * device,
|
||||
|
|
Loading…
Reference in a new issue